How to solve "entitlement 'keychain-access-groups' has value not permitted by a provisioning profile"

Kostia Kim picture Kostia Kim · Nov 29, 2011 · Viewed 32.7k times · Source

I am using keychain in my app and I get this error when run app as AdHoc. It doesn't appear when I run it with debugger (with developer provisioning profile). If app has already been installed on the device and I install it again on top of it from Xcode then I notice that app doesn't have access to keychain. It happens certainly because of those error.

I have spent much time googling that error and some recommends to add entitlements file with keychain-access-group in it. But I could not find any Apple doc or any reasonable explanation what entitlements file needed for.

Can someone help me to solve it?

Answer

Wiz picture Wiz · May 22, 2012

There is a pretty old post here you need the entitlements to say which Bundle Identifier you App's Bundle seed is under since that is the way KeyChain allows your application to access it by.

Once two Applications have the same Bundle identifier in their bundle seed, they can share KeyChain access..

So if Application A has a Common Bundle Id: com.yourcompany.AAAAAA And application B as a Common Bundle Id com.yourcompany.BBBBBB

And if they both have an entitlements file in their .ipa (plist containing an array keyed "keychain-access-groups" with a string ".com.yourcompany.AAAAA" and .com.yourcompany.BBBBB")

They can share KeyChain access..

  • Regarding your Debug/AdHoc issue. in the project settings, check under "Code Signing"->"Code Signing Entitlements" that both are empty..