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

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -