Reputation: 3349
Have an application that has been using Keychain Access for a bit and working fine.
Added a Today Widget and then added the App Group Entitlement.
All seems to be good, but now getting
CRASH: Couldn't add the Keychain Item Error
Domain=NSOSStatusErrorDomain Code=-25243
"The operation couldn’t be completed. (OSStatus error -25243.)".
When trying to use the keychain.
This is on a DEVICE and not in the simulator.
Using device because of testing with Push Notifications.
Have tried cleaning, updating profiles, etc.
XCode 6.3.1 Mini iPad iOS 8.3
Upvotes: 3
Views: 1942
Reputation: 4122
The error -25243
is often caused by trying to access a keychain access group for which you don't have permissions because they might be missing from your Entitlements.plist file or your provisioning profile.
So you should do the following:
If everything is OK after checking up the above steps, my two cents would be that the provisioning profile that you use for your debug schema which you use to build the app to run on the device does not contain the required entitlements.
Edit: 4. According to the OP, one should also check if the value item for com.apple.security.application-groups
in the entitlements file matches.
Upvotes: 1