Receipt not auto update issue in auto-renewing subscription

Summary:

I'm devleoping auto-renewing subscription, I meet a strange issue in sandbox, the issue is receipt not auto update by appStoreReceiptURL.

Detailed description:

1. Jsut recvied init purchase receipt, not lastest receipt when after 5 minutes.

2. In usually, genrate a new receipt when after 5 minutes.

3. I tryed use SKReceiptRefreshRequest or restore method to update receipt, but this way bring on user need to input password and apple id.

My testing envirment:

Device: iPhone 6/iOS 10.1.1

Xcode: 8.2.1


My question:

1. My issue is a normal issue or iOS SDK bug?

2. The issue also appear in product?

3. Except SKReceiptRefreshRequest and restore methods, any have else methods to resolution the issue?


Thanks a lot for any help and hints!

Replies

Whenever there is a call to updatedTranscations the receipt should update itself.

An autorenewable subscription in the sandbox will only renew itself 5 times. Then stops renewing. Is this what you are seeing? If so, it is normal behavior. You will need to test with a new test user.

Post not yet marked as solved Up vote reply of PBK Down vote reply of PBK

Over the past couple days we've had several customer emails about their subscriptions not renewing correctly. I created a new Sandbox account today and we're no longer receiving any updatedTransactions callbacks when the subscription renews, so if this behavior is the same in the Production environment it would explain why users in the release app aren't having their subscriptions renew correctly. Calling restoreCompletedTransaction does generate the updatedTransaction, and so does the initial subscription purchase, so it seems to be working normally otherwise. This may be what's happening to you as well. Is anyone else receiving updatedTransaction callbacks during subscription auto-renewals?

Something seems really wrong. I am also not receiving any updatedTransactions callbacks in either the Sandbox or Production.

Are any of you still seeing this problem. There was a fix to the production server to address the issue reported in the Developer Forum posting

<https://forums.developer.apple.com/thread/20194>


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Yes. Just tested about 10 minutes ago in the Sandbox. I'm still not seeing updatedTransactions automatically generated after renewal. They do come through with restoreCompletedTransactions though.

Do you leave the app open waiting tor the renewal, or do you background the app, then move it to the foreground after the renewal time has occurred. The transactionObserver is the process which detects the incompleteTransaction which the store generates to indicate a renewal. The transactionObserver has to send a request to ask the server whether there are incompleteTrtansactions. the store won't do this automatically. The transactionObserver only fires when

1. the addTransactionObserver call is made or

2. when the app with an active transactionObserver active moves from the background to the foreground.


If you are doing the above and the transactionObserver is not notified, then check my comments in <https://forums.developer.apple.com/thread/20194> on submitting this issue as a bug report.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Thanks Rich. Yes, after renewal I bring the backgrounded app to the foreground and no updatedTransactions are generated. It's been working reliably for the last year or so. I'm curious if updatedTransactions is being called after renewal for anyone in the Sandbox currently? I haven't received any user emails today about renewal problems so I can't say whether this is still happening in Production. I'll submit a bug report asap as well.

Ok, I think I captured the StoreKit profile console output as described. The bug report is # 30026260. Thanks for any help.

I can't get updatedTransactions to fire in sandbox. Going to manage this all server side to avoid this kind of seemingly regular issue.

We have several apps for which the auto-renewing subscription simply do not work any more. "Restore Purchases" doesn't fix it, only deleting the app and downloading it from the App Store again finally gives the customers a new receipt with the updated subscription data. So we need to tell several customers per week to delete and re-download the app. It's a PITA. And now we have a customer where even that doesn't work even though iTunes and the confirmation e-mail state that the subscription was renewed. Hurray…