ios - is there any method to know if the app run for the first time -


i need know if app run first time setup default settings music on/off fx volume equal 0.5 ...

so there predefined way or need make manually?

you can put in - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions:

if (![[nsuserdefaults standarduserdefaults] boolforkey:@"applicationrunbefore"]) {     [[nsuserdefaults standarduserdefaults] setbool:yes forkey:@"applicationrunbefore"];     [[nsuserdefaults standarduserdefaults] synchronize];     // application running first time -     ... } 

hope helps...


Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

java - Why is BlockingQueue.take() not releasing the thread? -

jQuery Ajax Render Fragments OR Whole Page -