Keychain Error -25300

Hi All ,


When I try to retreive app credentails during a app launch , the keychain fails with following, Does not happen always but enough times to make me worried.

KeychainItemWrapper - initWithIdentifier - Error StatusCode : -25300

Happens during when app is launched from a killed state using core location delegate. Any tips on how the avoid will be appreciated ....


Thank You.

-25300 is

errSecItemNotFound
, which is a pretty standard keychain error. To debug this, my recommendation is that, when it occurs, you dump out the contents of your keychain to verify that things are in the state that you expect them to be in.

Check out the

-dumpCredentials
and
-resetCredentials
methods in this class.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I don't suppose it would be too much to ask to have all the secItems sample code ARCified?

It certainly wouldn’t hurt to ask.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

It seems reasonable to dump the credentials but according to rusty007 it happens randomly. I've read of a number of others seeing the same type of problem where randomly the query to the keychain is failing, normally when coming back from a "killed state" as was mentioned above. I've heard the same problem with our app and we are hearing it is happening more often in iOS9. I haven't read of anyone who has been able to come up with exact steps to duplicate so it is hard to debug.

It would be nice to know what might cause the keychain access to fail randomly where the call normally succeeds. If anyone has been able to figure out the problem, it would be nice to know.

Keychain Error -25300
 
 
Q