Is there a way to offer an In-App purchase programmatically?

143 views Asked by At

In the development of the version 2.0 of my app, I would like to change the economic model. Actually, my app cost 1.99$, but I would like to change it so that it's free at first sight, but some features reserved for users that have done an in-app purchase. Is there a way to offer this in-app purchase to users that have already purchased the app so that they don't have to buy again the full app?

To track if a user has done the purchase and allow him to use the premium features, I'll store a bool in the keychain. I could change this BOOL to YES if I detect an update from actual to the new version, but if the user change his device, this solution would not work and force him to buy the unlockable features!

Thanks in advance for your help!

1

There are 1 answers

2
Cagatay Kaptanoglu On BEST ANSWER

You can do it with Receipt Validation. It is the most convenient way for what you want to do, so you don't worry about if the user change its device.

The logic behind the receipt validation should be like that you will get the receipt and pull the Original Application Version of the app. Then compare that version number with free version number.

If the Original Application Version lower than the free version number then unlock all paid content for that user for free.