Hi there,
I’m just starting out trying to implement and test an App Store auto-renewable subscription. I followed the setup guide and am using the iOS simulator to test. I was able to make a test purchase of a monthly product I have configured and I can see it in the sandbox with my anonymous user. I can see also subsequent purchases for the same user. The question I have is, all of the purchases are INITIAL_PURCHASE and none of them are RENEWAL. I was wondering if this was normal? From what I understand, the app store should do up to 6 renewals per day before you have to wait 8 hours to test again on the same sandbox user account? I can see currently 20 INITIAL_PURCHASE transactions in the Overview Dashbaord.
In my code I just added this one:
Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
if let customerInfo = customerInfo {
if customerInfo.entitlementsmname]?.isActive == true {
// code for unlocking goodies
}
}
}
And in my AppDelegate I added this one which seems to do nothing for now:
extension AppDelegate: PurchasesDelegate {
func purchases(_ purchases: Purchases, receivedUpdated customerInfo: CustomerInfo) {
// do something here...
}
}
Also from my AppDelegate, this gets called from didFinishLaunchingWithOptions
Purchases.shared.getCustomerInfo { (customerInfo, error) in
if let customerInfo = customerInfo {
if customerInfo.entitlements.allnname]?.isActive == false {
// hide paid stuff logic
}
}
}
I have no idea if what I am seeing is the expected behaviour or if there is something wrong. Can anyone tell me why I haven’t seen any RENEWAL type transactions in the dashboard yet?
Cheers