Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profile doesn't match the entitlements file's value for the application-identifier entitlement

I am trying to upload an app to the app store and I am getting this error on the page that has the certs. As far as I can tell I have changed the field so they have matched, but I am missing something.

this is what pops up

Any help would be greatly appreciated.

info.plist

like image 518
Paul Raymond Avatar asked Sep 11 '17 05:09

Paul Raymond


People also ask

How do I add entitlements to my provisioning profile?

To use this special entitlement you must create a new provisioning profile in the Certificates, Identifiers & Profiles section of your developer account and select the entitlement after the “Do you need additional entitlements?” page.

How do I set entitlements in Xcode?

Select iOS > Resource > Property List. Name the new file " foo. entitlements " (typically, " foo " is the target name) Click the (+) next to "Entitlements File" to add a top-level item (the property list editor will use the correct schema due to the file extension)

What is entitlements file in Xcode?

An app stores its entitlements as key-value pairs embedded in the code signature of its binary executable. You configure entitlements for your app by declaring capabilities for a target in Xcode. Xcode records capabilities that you add in a property list file with the . entitlements extension.


3 Answers

I'm not sure why this fixed it, but I went into my Target's Capabilities tab, turned iCloud ON, tried to do an archive build, it failed, I turned iCloud OFF again, tried to do an Archive build and it succeeded, and after that it was able to automatically resolve certificates again.

like image 60
samkass Avatar answered Oct 20 '22 20:10

samkass


Rightclick on Finder -> Go to Folder...

~/Library/MobileDevice/Provisioning

For Xcode 11

~/Library/MobileDevice/Provisioning Profiles/

Delete all provisioning profiles, done.

like image 35
Nidhi Avatar answered Oct 20 '22 22:10

Nidhi


The app you created has an incorrect application-identifier value, for what the provisioning profile is expecting. The cert for appID com.example.foo for the team 2ABCDEFG will be expecting application-identifier: 2ABCDEFG.com.example.foo, your app declared that its appID was com.example.foo, but the application-identifier didn't match, either you are using the wrong team-prefix, or you have the bundleID misconfigured.

In my case, I am using build schemes to allow me to build a prod app and a qa app. com.example.foo for prod, and com.example.foo.qa for QA.

I had set my bundleIdentifier in the Info.plist to $(PRODUCT_BUNDLE_IDENTIFIER)$(BUNDLE_SUFFIX), which works great in the simulator and on device for having different apps, however, when the app generates its application-identifer during the archive phase, it must not be reading the bundleIdentifier generated by the Info.plist.

To remedy the situation, I edited FooProject.xcodeproj/project.pbxproj (with a text editor) to change my QA buildSettings PRODUCT_BUNDLE_IDENTIFIER to com.example.foo.qa

You can see Apple's Technical Q&A and this page to see their in depth dive into solving this. Once you run the following on your exported app:

codesign -d --entitlements :- ./Payload/myApp.app

and see what application-identifier your app was just built with, it should be pretty quick to realize what your are doing wrong.

I didn't find that page in my Google searching, because they don't actually use the phrase from the error message or call the application-identifier by its full name, but instead say App ID.

Also, the solution to this problem isn't to generate a new provisioning profile that has the application-identifier entitlement, it does have that entitlement, however, the value in the provisioning profile, and your app have to match.

like image 41
Peter Dietz Avatar answered Oct 20 '22 22:10

Peter Dietz