سؤال

As soon as I check "Use Entitlements File" in Xcode, I get the following error when I try to run my app on my phone:

The executable was signed with invalid entitlements.

The entitlements specified in your application’s Code Signing Entitlements
file do not match those specified in your provisioning profile.

I'm trying to get iCloud working, and it seems like I'm failing on step 1. I can run in the emulator, but not in the device I provisioned automatically through the organizer.

What am I doing incorrectly here?

هل كانت مفيدة؟

المحلول

First of all, you need to have specific provisioning for your App's ID, matching its bundle ID. Even if it's only for development, generic Team Provisioning cannot work to test iCloud.

If the App ID had been issued without iCloud enabled, and updated afterward, related Provisioning must be updated also.

Often, provisioning updating from Xcode's organizer fails to bring the right one. In this case, I suggest you to try to download updated provisioning directly from iOS Developer Website.

نصائح أخرى

In my case, I have added inter-app capability in my iOS project and Xcode automatically suggested to add this permission in the app id (bundle id) in the provisioning portal and I did so. After this I thought it was fixed since Xcode was showing tick marks for all under inter-app audio sections as follows

  1. Add the "Inter-App-Audio" entitlement to your APP ID
  2. Add the "Inter-App-Audio" entitlement to your entitlements file
  3. Link AudioToolbox.framework.

Actually it was not fixed and I had to generate another distribution certificate with inter-app enabled and only when I signed with that distribution certificate I was able to install the app.

You Need to have Developer Certificate And Private Key in your keychain And Provision profile that have created must match with this Certificate.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top