hanumanDev
hanumanDev

Reputation: 6614

reset app on user exit

is there a way to restore an app to the original settings when a user exits?

I need the app the reset every time it's closed out.

thanks so much.

Upvotes: 0

Views: 588

Answers (3)

k-thorat
k-thorat

Reputation: 5123

You can use this method application:didFinishLaunchingWithOptions:

EDIT: question was little confusing.. if you read all the thread. Application was running in background, answer is UIApplicationExitsOnSuspend is needs to add in the info plist.

Upvotes: 0

hotpaw2
hotpaw2

Reputation: 70673

Add the UIApplicationExitsOnSuspend key to your app's info.plist. This will cause your app to terminate when the user hits the button. Then don't load anything saved from NSDefaults (etc.) when your app restarts.

Upvotes: 4

Matthias Bauch
Matthias Bauch

Reputation: 90117

If you don't want to keep data after the application end just don't save it. Nothing is saved automatically for you.

Don't use NSUserDefaults, CoreData and don't store things on the filesystem.

Upvotes: 1

Related Questions