升级xcode8后各种坑,今天又一个 直奔主题:
调试运行后 status的值 为-34018
解决方法:
1
2
3
4
5
6
7
8
|
CFTypeRef persistKey =
nil
;
OSStatus status = SecItemAdd((__bridge CFDictionaryRef)publicKey, &persistKey);
if
(persistKey !=
nil
){
CFRelease(persistKey);
}
if
((status != noErr) && (status != errSecDuplicateItem)) {
return
nil
;
}
|
调试运行后 status的值 为-34018
解决方法:
选择TARGETS项目里的-Capabilities,然后打开Keychain Sharing 选项 即可
如下图