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
Post a Comment