2011. 9. 23. 18:16
IPhone
NSUserDefaults bool 타입 쓸경우
// Write user defaults
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:YES forKey:@"IsRegistered"];
// Read secure user defaults
BOOL valid = NO;
BOOL registered = [defaults BoolForKey:@"IsRegistered"];
if (!valid) {
// the property has been modified, handle this situation
} else {
// Valid property, do whatever you need to do
}
Secure 베이스로 쓰고 싶을경우 아래 경로를 참고
https://github.com/matthiasplappert/Secure-NSUserDefaults