问题描述
我正在为我的应用程序使用使用以下代码行
I'm using KeychainItemWrapper for my application using the following line of code
KeychainItemWrapper *currentUser = [[KeychainItemWrapper alloc] initWithIdentifier:@"com.example" accessGroup:nil];
[currentUser setObject:accountString forKey:CFBridgingRelease(kSecAttrAccount)];
accountString是一个包含我的用户信息的字符串。
accountString is a string containing my user information.
代码与iOS7完美配合,但与iOS8崩溃。
The code works perfectly fine with iOS7 but crashes with iOS8.
我不确定我做错了什么。有人可以帮忙!我正在模拟器上运行该应用程序。
I'm not sure what i'm doing wrong., can someone please help!! I'm running the application on a simulator.
更新:
这是崩溃
update:Here is the crash
* 断言失败 - [KeychainItemWrapper writeToKeychain]
* Assertion failure in -[KeychainItemWrapper writeToKeychain]
* 由于未捕获的异常'NSInternalInconsistencyException'而终止应用,原因:'无法添加钥匙串项。'
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'
推荐答案
看起来第一个BETA版本不支持Keychain Access开发人员API在模拟器上。希望这很快就会出现。
Looks like the first BETA version doesn't support Keychain Access developer APIs on the simulator. Hopefully this is brought in soon.
更新:看起来问题在Beta 2中得到修复
Update: looks like issue is fixed in Beta 2
这篇关于KeychainItemWrapper为iOS8崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!