views:

46

answers:

1

I want to delete a table from a sqlite3 db at certain times, i.e. after its been uploaded to a server. i want to set a flag that will mean the table does not get deleted the first time the app is launched. after that the logic will take care of when the table in the db is deleted.

i'm currently using nsuserdefaults to set a flag which indicates whether the table should be deleted or not. this is the flag that i want to set only once, to NO, when the application launches first time.

is there a way to do this in xcode?

+2  A: 

What's the problem using NSUserDefaults???

At the first start of your app you can check if the flag already exists (first launch -> flag doesn't exist). Then you can set the flag and at the next launch the set flag indicates, that it isn't the first launch.

schaechtele
yes, I think I was being silly there. Thanks
Remover