就想简单的使用Keychain,不需要Keychain Access Group ,也不需要其他复杂的应用,
就想简单的保存个用户名和密码之类的,
就想像用NSUserDefaults
那样来存储数据。
Methods as follows:
代码语言:javascript复制 (BOOL)setObject:(id)object forKey:(NSString *)key;
(id)objectForKey:(NSString *)key;
(BOOL)deleteItmeWith:(NSString*)key;
Set Item:
代码语言:javascript复制[SimpleKeychain setObject:@"value" forKey:@"key"];
Get Item:
代码语言:javascript复制[SimpleKeychain objectForKey:@"key"];
Delete Item:
代码语言:javascript复制[SimpleKeychain deleteItmeWith:@"key"];
这是Demo