KeychainItemWrapper Crashing for iOS8
Asked Answered
L

1

4

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.'

Larrisa answered 6/6, 2014 at 2:40 Comment(2)
And what is the crash?Passover
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'Larrisa
L
3

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

Larrisa answered 6/6, 2014 at 21:42 Comment(4)
Is this a guess or you have some official confirmation?Corbicula
Its official. Please go through pre-release documentation.Larrisa
With xcode beta 3 I still have this issue in ios simulator: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Problem deleting current dictionary.'Sensual
I'm getting this same error (Problem deleting current dictionary). Haven't changed the code at all from xcode 7 but now on xcode 8 I get it. Also- I don't get the error when running on a device- only on the simulator. Not sure if this is an Xcode bug or something I need to change with regard to the Keychain access methods.Subjugate

© 2022 - 2024 — McMap. All rights reserved.