Objective c 使用keychain登录和注册
我听说使用Objective c 使用keychain登录和注册,objective-c,xcode,keychain,keychainitemwrapper,Objective C,Xcode,Keychain,Keychainitemwrapper,我听说使用keychain比使用NSUserDefault 问题是我不知道如何使用它。 我正在尝试使用所有不同的密码和用户名登录和注册用户。 有人可以演示或截图的代码如何做到这一点吗?哦,我使用的是xcode 4.6这里可以找到apple的KeyChainItemWrapper类: 您可以像这样使用它: KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:@"YourAppLog
keychain
比使用NSUserDefault
问题是我不知道如何使用它。
我正在尝试使用所有不同的密码和用户名登录和注册用户。
有人可以演示或截图的代码如何做到这一点吗?哦,我使用的是xcode 4.6这里可以找到apple的KeyChainItemWrapper类: 您可以像这样使用它:
KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:@"YourAppLogin" accessGroup:nil];
// Set the username and password using:
[keychainItem setObject:@"password you are saving" forKey:@"Password"];
[keychainItem setObject:@"username you are saving" forKey:@"Username"];
// Get them
NSString *password = [keychainItem objectForKey:@"Password"];
NSString *username = [keychainItem objectForKey:@"Username"];
// Delete them
[keychainItem resetKeychainItem];
NSUserDeaflots在应用程序中存储数据,
密钥链
在iOS密钥链中存储数据。你可以用。 它使用简单,可用于圆弧和非圆弧
同时选中此项查找包装器。你指的是通过github已经有了一些内容?为什么不使用SQLite、核心数据或任何与数据库有关的内容呢?@Goppinath我试过了,但出于某种原因,我一直收到mach o-linker错误。