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?.entitlements["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?.entitlements["Full Access"]?.isActive == true {
      // subscription access to Lenses was purchased and is still active
      unlockContent = true
    }
  }
}
Â
Does this make sense?
