Skip to content

Instantly share code, notes, and snippets.

@rkotzy
Created April 25, 2019 02:24
Show Gist options
  • Save rkotzy/50be39c452d8964f222ea86332b4582a to your computer and use it in GitHub Desktop.
Save rkotzy/50be39c452d8964f222ea86332b4582a to your computer and use it in GitHub Desktop.
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