IOS In-App Purchase No Back-End

I am exploring the use of in-app purchases for what would essentially be a β€œpro” version of my app. The application itself will be free, but once the user has the opportunity to purchase pro content (only 1 thing). The contents of β€œpro” will already be in the application, and there is no need to download it, it simply β€œunlocks” it.

  • Is this allowed in the Apple Guide?
  • Since only 1 non-expendable will be purchased, I think that the use of an internal server is not required.
    • Again, what is allowed from the recommendations?
    • It is safe and simple to save the result to NSUserDefaults, and if it is installed on another device, you can extract it from SKPayment recovery, etc.

I considered a few other questions.

And it looks like my approach is valid, but since I know that these things have changed lately, I want to make sure that I take the right approach.

Thanks!

+4
source share
2 answers
  • No problem creating content.

  • The best practice is to perform check verification on a server with an authentication protocol between the application and the server (this is also true for several other mobile app stores). If you perform validation on a device, people can use existing tools to bypass IAP validation and content theft. See https://developer.apple.com/library/ios/#releasenotes/StoreKit/IAP_ReceiptValidation/ for some information.

Therefore, while a server is not required, it is recommended. Only you can tell whether it is worth protecting your content, it is worth it to support the server.

I agree with J. Freeman that direct storage at NSUserDefaults seems weak. I store things in a local file, but the format is attached to the device and it requires a server compute key to create it. Lastly, yes, you must use SKPaymentQueue restoreCompletedTransactions to purchase items purchased on another device. Understand that recovered transactions should also check their receipts on your server.

+3
source

Yes, it is normal. You do not need a backend for in-app purchases, and this is normal for your content.

I would say be careful, although it stores unlock information in NSUserDefaults, as someone can easily fake purchases this way. You must store the unlock information in the keychain.

+1
source

All Articles