Skip to main content

Active entitlement doesn't change when upgrade to a new product

  • September 6, 2022
  • 0 replies
  • 76 views

Forum|alt.badge.img+4

I have two products (weekly, monthly) and two entitlement attached to them. In sandbox, when I purchase the first weekly, the entitlement is right. But when I upgrade to the monthly when weekly entitlement is active, active entitlement seems to be be still the weekly. I expect it to entitled to only monthly. Upon purchase of monthly debug logs show the purchased product as monthly but I can’t get its entitlement as active entitlement.
purchaseInfo.entitlements.active seems to have only one entitlement and it’s weekly. The product definitions are in the same subscription group. The sandbox data also shows the latest purchase as weekly and user’s entitlement to monthly. What could be the problem here?
I’m checking it like shown below:
 

Purchases.shared.purchase(package:selectedPackage) { transaction, purchaseInfo, error, userCancelled in
            if let error = error {
                    print(error.localizedDescription)
                    self.purchaseFailed(purchaseInfo, error, userCancelled)
                } else {
                  guard let purchaseInfo = purchaseInfo
                  else{return}
let activeEntitlement = purchaseInfo.entitlements.active.first?.key
}

}

Version: 4.9.0

This post has been closed for comments

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings