Read from keychain results in errSecItemNotFound 25300

那年仲夏 提交于 2019-11-30 03:51:40

问题


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.


回答1:


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.




回答2:


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




回答3:


@graver

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

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



来源:https://stackoverflow.com/questions/17299442/read-from-keychain-results-in-errsecitemnotfound-25300

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