9
votes

I store username & password using keychain, sometimes when I tried to get the password of the username, it told me errSecItemNotFound.

I keep that the password is always existed in keychain, so why it is not found?

Thanks.

3
Something I encountered is as follows. User name get first letter capitalized due to misconfiguration of email field. Ex. [email protected]. But when I make api request backend save it as [email protected] and I save [email protected] in the in keychain as account but I try to delete [email protected] when logout. Silly mistake. Hope this help someone. - MadNik

3 Answers

1
votes

Tony: that error is simply OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements.

This could be happening as a result from using a nonstandard app signing method or some other problem with your entitlements. Make sure you're building simply out of Xcode and not using alternate signing methods unless you completely understand them.

0
votes

When reading the keychain, make sure you always build with a provisioning profile linked with the appId that used to create the keychain record.

0
votes

@graver

http://opensource.apple.com/source/Security/Security-55471/sec/Security/SecBasePriv.h

errSecMissingEntitlement = -34018, /* Internal error when a required entitlement isn't present. */