Skip to main content
Question

All of the purchases I see are INITIAL_PURCHASE and none of them are RENEWAL for a monthly subscription


Forum|alt.badge.img+1

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.entitlements[name]?.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.all[name]?.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

2 replies

Forum|alt.badge.img+1

Ok, it was because I was testing on the simulator using a storekit config and scheme. Testing on the device appears to be the only way to get it to do renewals.


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 537 replies
  • May 25, 2023

Yes, we do recommend testing on a physical device as testing on a simulator can cause issues.


Reply


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