Hello,
I have an existing app which is beeing sold in the app store since 2010. Now I want to convert this app into a free app with optional in-app purchases. A part of the functionality which paid users currently have should then be accessible only by IAP.
Therefore, I must identify my existing customers, to not make them pay again for functionality they have paid already.
Googling around reveals that this is not easy to do, if it was possible at all. However, I found this post: https://stackoverflow.com/questions/3735635/convert-existing-ios-paid-app-to-freemium-model-with-in-app-purchase
Quote:
However, in my tests, receipt will always be nil. The URL also points to some local location with sandbox in the name.
Am I doing something wrong in general, or is this just not supposed to work how I thought it would? Note that I have installed my app from the app store on my device, then launched the above code on my device (so I'm NOT testing this in the simulator).
I also read about SKReceiptRefreshRequest, however I cant figure out how to use it.
So the question is, how would I figure out if a user has already purchased the orignal paid version? My app does not have a server-component, and by checking some NSUserDefaults key would result in charging users which reinstall the app on a new device.
So what should I do?
I have an existing app which is beeing sold in the app store since 2010. Now I want to convert this app into a free app with optional in-app purchases. A part of the functionality which paid users currently have should then be accessible only by IAP.
Therefore, I must identify my existing customers, to not make them pay again for functionality they have paid already.
Googling around reveals that this is not easy to do, if it was possible at all. However, I found this post: https://stackoverflow.com/questions/3735635/convert-existing-ios-paid-app-to-freemium-model-with-in-app-purchase
Quote:
Now I have played around with this a bit, or more precisely:"There is now an Apple-approved way to do this on both iOS and macOS. The
originally downloaded version of the app can be obtained from the
receipt using the info key Original Purchased Version. You can then decide whether to unlock features if that version predates the switch to IAP."
Code Block NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
However, in my tests, receipt will always be nil. The URL also points to some local location with sandbox in the name.
Am I doing something wrong in general, or is this just not supposed to work how I thought it would? Note that I have installed my app from the app store on my device, then launched the above code on my device (so I'm NOT testing this in the simulator).
I also read about SKReceiptRefreshRequest, however I cant figure out how to use it.
So the question is, how would I figure out if a user has already purchased the orignal paid version? My app does not have a server-component, and by checking some NSUserDefaults key would result in charging users which reinstall the app on a new device.
So what should I do?