Open Spacelapp opened 9 years ago
No, and it does not feel like a good idea to do that. Can you investigate the cause of the crash?
I am running in to this same problem. I have a Today Widget extension that can update when the phone is locked and it makes a call to retrieve the accounts. I have been able to fix the assert by adding kSecAttrAccessibleAfterFirstUnlock, kSecAttrAccessible
to the query for the Keychain item. I would create a pull request, but just adding this attribute will break keychain functionality for people already using the library. This is because the query is modified, so the old keychain item can't be deleted or retrieved with the new query. It seems like we would need to add some kind of update method that adds the kSecAttrAccessible
attribute to the existing keychain entry and then the new query should work.
Any clue about this 4294941988 error code? I just find the same issue from my App. It's already using kSecAttrAccessibleAfterFirstUnlock for kSecAttrAccessible.
I also facing same error: *\ Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected error while fetching accounts from keychain: 4294941988'
4294941988 is not the right error code value. This number is a result of usage %zd format during error printing.
The correct value is -25308.
errSecInteractionNotAllowed = -25308, /* User interaction is not allowed. */
You can check it by running following lldb command:
(lldb) po [NSString stringWithFormat:@"%zd",-25308]
4294941988
I fixed it in my app by adding the "Keychain Access" entitlement under the Project settings->Targets, choosing the Capabilities tab. This allows it to work in iOS 10.1.
Any option to disable account storing in the keychain?
Here's the crash: Application Specific Information: *\ Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected error while fetching accounts from keychain: 4294941988'
Best regards, Lukas