3

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

ort11
  • 3,359
  • 4
  • 36
  • 69
  • [Addition] After trying many things, this is still happening when trying to run the application on hardware for debug. Have checked provisions, app IDs, etc. Any ideas anyone? – ort11 May 08 '15 at 18:54

1 Answers1

1

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:

  1. Check that you have your entitlements file in your project.
  2. Try disabling/enabling entitlements.
  3. Check that your app id has the required permissions enabled and that your provisioning profile(s) which you use with your build schema when you run the app on the devices have been regenerated with the new permissions/entitlements.

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.

Razvan
  • 4,122
  • 2
  • 26
  • 44
  • 1
    Am accepting this, the issue was the the plist entry did not match what was in code for the key wrapper.... – ort11 May 13 '15 at 18:18