KeychainItemWrapper Crashing for iOS8

耗尽温柔 提交于 2019-12-09 18:40:56

问题


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 is a string containing my user information.

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

* Assertion failure in -[KeychainItemWrapper writeToKeychain]

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'


回答1:


Looks like the first BETA version doesn't support Keychain Access developer APIs on the simulator. Hopefully this is brought in soon.

Update: looks like issue is fixed in Beta 2



来源:https://stackoverflow.com/questions/24073320/keychainitemwrapper-crashing-for-ios8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!