I have an existing app (“Cameras”) with a subscription product and lifetime product that share the same entitlement. I’m creating a new app (“Lenses”) and I want to share subscriptions between them, but not lifetime purchases. I believe I can do this without having to make a new entitlement, and just checking the allPurchasedProductIdentifiers. For example, here’s what it might look like in the Cameras app:
Purchases.shared.getCustomerInfo { (purchaserInfo, error) in
if let allProducts = purchaserInfo?.allPurchasedProductIdentifiers {
if allProducts.contains("com.grayhour.cameras.lifetimeaccess") {
// lifetime access to Cameras was purchased at some point
unlockContent = true
} else if allProducts.contains("com.grayhour.cameras.monthlysubscription") && purchaserInfo?.entitlementsp"Full Access"]?.isActive == true {
// subscription access to Cameras was purchased and is still active
unlockContent = true
} else if allProducts.contains("com.grayhour.lenses.lifetimeaccess") {
// lifetime access to Lenses was purchased at some point. Not relevant to unlocking content in this app.
} else if allProducts.contains("com.grayhour.lenses.monthlysubscription") && purchaserInfo?.entitlementss"Full Access"]?.isActive == true {
// subscription access to Lenses was purchased and is still active
unlockContent = true
}
}
}
Does this make sense?