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