Subscription Renewal

Folks;


In the "Expiration And Renewal" section the "In-App Purchasing Guide" says:

"...Your app checks the transaction queue on launch and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews, the transaction observer is not called; your app finds out about the renewal the next time the app is launched.."


So there appear to be 2 scenarios for a subscription which does in fact renew:

1) If the app is NOT running when the current subscription expires

When the app is finally re-launched the contents of the reciept will contain the expired subscription as well as the new subscription which is not expired. Even if the app is not relaunched for 2, 3, or more subscription periods, as long as the renewal is happeing, on re-launch the app will not be expired.


2) If the app IS running when the current subscription expires

It appears that the correct response to this circumstance would be for the app to inform the user and then offer the opportunity to:

1) refresh the receipt (which will require their credentials)

OR

2) re-launch the app in order to 'coerce' the newer receipt to become available....


Am I understanding this correctly?

Replies

You are.

I believe that "launch" is not required, just an addTransactionObserver after the app has removeTransactionObserver or quit. So another approach is detect that the subscription has expired and (if necessary - removeTransactionObserver then) addTransactionObserver and await a call to updatedTransactions. If it does not come then tell the user they must check their subscription at the App Store and have them respond "YES" or "Not at this time" and do a restoreCompletedTransactions. Refreshing the recipt will not register their device to receive the next renewal call to updatedTransactions but restoreCompletedTransactions will.