objective c - Check for first launch of my application -


how check if first launch of of application using nsuserdefaults , running code first time app opens?

this should point in right direction:

static nsstring* const hasrunapponcekey = @"hasrunapponcekey"; nsuserdefaults* defaults = [nsuserdefaults standarduserdefaults]; if ([defaults boolforkey:hasrunapponcekey] == no) { // code want run on first use... [defaults setbool:yes forkey:hasrunapponcekey]; } 

Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -