elegant way to implement iOS in-app upgrading (feature unlocking)
I have an app and want to release a Lite version of it to increase visibility and give people a chance to try it first. People can either download the Lite version and then upgrade to Pro through in-app purchase, or they can immediately buy the Pro version from the app store.
What's the most elegant way to implement this so that code maintenance is minimised? Is there a way to implement it in a single XCode project?
I was thinking of implementing a bool flag in the standardUserDefaults, which when set to YES unlocks the upgrade (this is for the Lite version).
Then for the Pro version, my thoughts 开发者_如何学Pythonare to include a BOOL flag in the Info.plist file.
The code that does the "am I a Lite or Pro" then just has to check for the presence of either of the above flags and I can maintain a single XCode project--as long as I add the appropriate logic in the menus or wherever to hide the Pro features--but what implications does this have for publishing to the app store?
Am I correct in thinking that when publishing, I just have to edit the Bundle ID and Info.plist before submitting?
How have others solved this problem? It's the first time I'm doing it so would love to hear some input from people with experience.
精彩评论