Persist property iOS -


i need way of persisting property value can 1 of 2 states on ios devices. value must accessible parts part of application invisible other applications, easy read , write , must survive 1 program run next , os restarts. option best situation on ios?

since data set small,i think nsuserdefaults should option

//save nsuserdefaults * userdefaults = [nsuserdefaults standarduserdefaults]; [userdefaults setbool:true forkey:@"state"]; [userdefaults synchronize];  //get bool state = [userdefaults boolforkey:@"state"]; 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -