Created
April 25, 2019 02:24
-
-
Save rkotzy/50be39c452d8964f222ea86332b4582a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func configureCatContentFor(purchaserInfo: PurchaserInfo?) { | |
if let purchaserInfo = purchaserInfo { | |
if purchaserInfo.activeEntitlements.contains("pro_cat") { | |
// ... | |
// ... | |
// ... | |
} else { | |
// ... | |
// ... | |
// Check if we should show a Subscription Offer | |
// and display the promo upsell after 2 seconds | |
if #available(iOS 12.2, *) { | |
if shouldShowSubscriptionOffer(purchaserInfo) { | |
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) { | |
self.showPromoUpsell() | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment