i have app trying call method once no matter how many times user runs app. right using this:
nsuserdefaults *defaults = [nsuserdefaults standarduserdefaults]; if ([defaults objectforkey:@"runonce"]==nil) { //my method [defaults setobject:@"yes" forkey:@"runonce"]; [defaults synchronize]; }
but when run code error:
index 0 beyond bounds empty array
this first time using nsuserdefaults i'm not sure i'm doing wrong.
this problem applied database, not particular one.
Comments
Post a Comment