Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 501
Kostia Kim Avatar asked Nov 29 '11 08:11

Kostia Kim


People also ask

How do I fix failed to create a provisioning profile?

3. How To Fix Xcode Failed To Create Provisioning Profile Error. To fix this error is very easy, just connect your real iOS device such as iPhone to the Mac computer with a USB line, follow the popup screen on the iPhone, then you can select your iOS device in the Set the active scheme drop down list.

How do I add a device to provisioning profile?

Adding a new device to the Ad Hoc ProfileGo to the iOS Provisioning Portal and click on Provisioning. Select the Distribution tab. 2. Select the Ad Hoc profile you want to modify and click 'Edit'.


1 Answers

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..
like image 143
Wiz Avatar answered Sep 21 '22 17:09

Wiz