I need to update my application after the user pays for an update. I want to alter the current application instead of downloading a new version. After the user pays, I will enable certain functions of the app.
How would I implement this?
I need to update my application after the user pays for an update. I want to alter the current application instead of downloading a new version. After the user pays, I will enable certain functions of the app.
How would I implement this?
You can't update on the go your application.
You need to put some kind of boolean switch value in a config file. (or with a server handshake)
You can't update the code or app bundle in any way. You can download resources or modify configuration files, however. So all features need to exist, but may be disabled. For something like a game you could download some more levels upon purchase.
Apple will not allow an app that has visible but unusable features. You can't show a grayed out feature and say, "pay us to get this feature." Neither will they let you significantly alter an app without changing its name. Instead they force you to issue a lite version with the option to upgrade to a full and/or pro versions. They do this both to protect the user and to protect their revenues from the app store.
A really good way to determine if Apple will let you do something is to ask, "Does Apple stand to lose money if I do this?" If the answer is yes, then chances are very good your idea won't fly.
Also, remember that the app store has a rule that once a user pays for an app, they automatically receive all future versions of the app free of charge. You can't force users to pay for upgrades the way you can on conventional platforms.
Having said that, since you can't run another process to upgrade your app on the iPhone, I think the only way to upgrade an existing app without replacing it would be to use some kind of modular plug-in architecture in which you download plug-ins that add more features. Objective-C makes it ridiculously easy to implement plug-ings.