Issuing an SKReceiptRefreshRequest on the app's startup

Hi all,

these observations apply to the Sandbox.


In my app, I do a local receipt validation on startup. Apple's documentation "Validating Receipts Locally" says:

"If validation fails in iOS, use the SKReceiptRefreshRequest class to refresh the receipt"


If I install the app on a new device, receipt validation always fails because there is no local receipt (yet) on the device. But if I use a SKReceiptRefreshRequest, it will prompt the user with a iTunes login. So any time a user installs the app on a new device, they will receive this prompt, which could be confusing.


What's the recommendation here? Add an own prompt before the SKReceiptRefreshRequest that explains why the login is required?


Thanks,
Markus

  • After my build #1 (depending on successful SKReceiptRefreshRequest) was rejected, I attempted your suggestion in a build #2 - which was also rejected with the justification:

    "your app returned an iTunes Store connection error. By continuing without receipt we are unable to access the subscription purchase flow."

    Imho, the problem is an occational communication problem in the Sandbox environment.

Add a Comment

Replies

The recommendation is to look for the receipt but don't do a refresh. If there is no receipt then place the user in a category where they have not yet purchased the IAP. Give them the option to 'restore purchases' or 'if you have purchase a subscription on another device owned by you tap ......'. If they chose 'restore purchases' then do a refresh (or a restoreCompletedTransactions).

Thanks for your answer. So I guess Apple's documentation is not accurate at this point?


However, there is one problem for me with not doing a refresh. I'm about to convert my app from "paid app" to the fremium model, i.e. a free app with in-app purchases. My previous customers shouldn't need to pay again, so my plan was to check the "original purchase version" to enable all features for the previous customers. To do so, I need the receipt.


So I'd still need some kind of prompt at startup to allow previous customers to trigger the refresh... Any better way to do so?

>I guess Apple's documentation is not accurate at this point?


I believe elsewhere Apple tells developers not to call SKReceiptRefreshRequest without the user knowing that they will be asked to log in to the App Store.


> So I'd still need some kind of prompt at startup to allow previous customers to trigger the refresh...


Somewhere you tell users about how they can upgrade the app to include the IAP features. Just add to that something like 'If you have purchased an early version of the app or if you have purchased the IAP on another device that you own, then tap 'restore purchases' below'


or...


On first launch of the app (you only need to do this once), if there is no receipt, show an alert message like 'If you purchased an earlier version of this app you may be entitled to the fancy features - tap Restore Purchases below'

Thanks for your answers, sounds good.


I actually realized that the missing receipt on fresh install is probably only happening in the sandbox environment. Afterall, I'm just sideloading the app from XCode, so actually no surprise there is no receipt. If one installs the app in the production environment from the App Store, probably there will be an receipt. I'll check it out once my app is on the App Store.


Anyway, I will still implement your suggestions as a fallback.