0
目前,我在iOS应用程序中做了两个应用程序。如何在钥匙串数据中加载其他iOS应用程序?
这是我的源代码。
* TestProject源代码* - >写入到钥匙串
KeychainItemWrapper *idKeyChain = [[KeychainItemWrapper alloc] initWithIdentifier:@"TestProject" accessGroup:@"TestProject.com.test"];
[idKeyChain.keychainItemData setObject:@"testValue" forKey:(id)kSecValueData];
[idKeyChain release];
TestKeyChain源代码 - >负载到钥匙串
KeychainItemWrapper *idKeyChain = [[KeychainItemWrapper alloc] initWithIdentifier:@"TestProject" accessGroup:@"TestProject.com.test"];
NSString *username = [idKeyChain objectForKey:kSecAttrAccount];
[idKeyChain release];
NSLog(@"password : %@", username);
我猜想要打印什么用户名值。 <password : testValue>
,但记录的打印.. <password : >
目前,我浪费了3小时只有这个问题.. 出了什么问题?