views:

167

answers:

1

Hello,

I'm looking for a way to reboot my app after an in app purchase has been made. Once the user upgrades I need the ads to go away and to basically reload the app from scratch so all the new functionality will be added the next time the app loads. I'm thinking the easiest way is going to be to exit the app then automatically restart the app but I'm not sure if this is possible.

Does anybody know how to do this?

Thanks in advance.

+5  A: 

No. Instead allow your app to alter itself when something has been purchased. Call a method on the objects that need to have their content changed so they can be notified of the state change and alter their own internals to conform.

Sometimes if it seems there is no way to do what you want, then there is a better way.

Squeegy
+1, if you need to reboot your app to make this change, there's something wrong with its design.
Carl Norum
I basically agree. I ended up in this question because i offer the user a possibility to change the applications language setting. changes to the standardUserDefaults require a restart, don't they?
samsam
No, they do not. Anytime you write to standard defaults, whatever you write is immediately available for reading afterward. Not restart required.
Squeegy