Skip to content

Instantly share code, notes, and snippets.

@cipolleschi
Last active August 15, 2020 17:12
Show Gist options
  • Save cipolleschi/0327ac600cde41e1cc051d709021760b to your computer and use it in GitHub Desktop.
Save cipolleschi/0327ac600cde41e1cc051d709021760b to your computer and use it in GitHub Desktop.
func buildDependencies() -> Dependencies {
#if UITESTING
if UserDefaults.standard.object(forKey: "mockPurchase") != nil {
let mockedMonetizationResult = UserDefaults.standard.bool(forKey: "mockPurchase")
return Dependencies(purchaseManagerDependencies: .mocked(with: mockedMonetizationResult))
}
#endif
return Dependencies()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment