我刚刚尝试使用 Apple 提供的 KeychainItemWrapper,但每次都出现链接错误:
Undefined symbols for architecture i386: "_OBJC_CLASS_$_KeychainItemWrapper", referenced from: objc-class-ref in DataModel.o
ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经包含了安全框架并检查了为什么 Apple 包含在 Xcode 项目中,但我似乎找不到其他问题。
_keychain = [[KeychainItemWrapper alloc] initWithIdentifier:@"com.website.project" accessGroup:nil];
[_keychain setObject:_username forKey:(id)kSecAttrAccount];
[_keychain setObject:_password forKey:(id)kSecValueData];
我还将“com.website.project”添加到我的钥匙串(keychain)访问组。
最佳答案
确保 KeychainItemWrapper 在“编译源”列表中。
关于ios - KeychainItemWrapper 链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10611434/