I'm currently using a StoreKit configuration file to test auto renewable subscriptions. On my device I am subscribed to subscription with a duration set to weekly. The subscription renewal rate is set to "Monthly Renewal Every 15 Minutes."
This all works fine for awhile. The subscription auto renews. But after a few hours suddenly my app detects that the subscription has expired and the app UI behaves accordingly.
My app does the following:
- Looks at the in app purchase receipts and finds the one with the latest expiration date.
- If the current date is later than the expiration date of this receipt my app acts like the subscription has expired. I even add a bit of extra time on the expiration date in case an auto renewable transaction gets held up (in the debug environment I add a couple hours).
I don't take any interaction to cancel the subscription in the "Manage StoreKit Transactions" area of Xcode, nor do I do anything programmatically to cancel the subscription. Autorenew just stops working.
I noticed this happens when the in app purchase receipt count is high (currently it is at 1776 in app purchase receipts). So I'm wondering if this is a bug in the StoreKit configuration environment that happens when auto renewing subscriptions causes the in app purchase receipts to grow large and it just quits auto renewing the subscription?
If I navigate to the area in my user interface and resubscribe to the weekly plan it works again for awhile. The issue then will reoccur after a few hours again, forcing me to "resubscribe" to the plan I've never unsubscribed for.
Is StoreKit testing discarding in app purchase receipts when the receipt gets large but instead of discarding the oldest receipt it removes the in app purchase receipt that is not yet expired, thus forcing me to resubscribe?
Anyone else experience this issue with StoreKit testing? Seems like it's an issue with the testing environment but naturally can't be sure.