Setting an Entitlements file - The executable was signed with invalid entitlements

江枫思渺然 提交于 2019-12-08 10:02:42

问题


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?


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/12770298/setting-an-entitlements-file-the-executable-was-signed-with-invalid-entitlemen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!