Updating an App for the first time since 2011. Build, Analyze, Archive all successful. Automatically Manage Signing checked. Validation fails with 90286 - Invalid code signing entitlements, and 91130 - Invalid Provisioning Profile dozens of times after tweaks, clean builds, trying manual signing (thought I was done with that), etc.
For 90286 it seems my Developer ID , e.g. 346JXXXXX (not Team ID, QZ99XXXXX) is the prefix for the bundle ID, com.company.app-name and that generates the error?
For 91130 it's invalid "com.apple.application-identifier" which I assume is the same issue with a Developer ID instead of a Team ID.
The original version of the app was QZ99XXXXX.com.company.app-name. I even changed the bundle identifier in Xcode to that, and got this:
App Record Creation failed due to request containing an attribute already in use. The app name you entered is already being used for another app in your account. If you would like to use the name for this app you will need to submit an update to your other app to change the name, or remove it from App Store Connect.
Yes, the original app name is being used for an app in my account. I was trying to update the app, checked all the boxes, added update text, but of course there was no build to upload.
Would appreciate any help.
346JXXXXXX is my Team Member ID
No it isn’t. Rather, it’s your App ID prefix. That much is very clear from my view of your team, but you can prove it for yourself. Do this:
- Go to the Certificates, Identifiers, and Profiles section of the Developer website
- Switch to Identifiers.
- Filter for App IDs containing
com.company.app-name(well, your real bundle ID, not the redacted one we’re using here). - Open the one you find.
At the top right you’ll see your Team ID and in the App ID Prefix field you’ll see your… well… App ID prefix. Here’s an example of what that looks like for an App ID in one of the DTS test teams:
If you manually generate a provisioning profile for that App ID and then dump that profile you’ll see something like this:
% security cms -D -i AppIDPrefixTest_Mac_Dev.provisionprofile | plutil -p -
{
…
"ApplicationIdentifierPrefix" => [
0 => "VYRRC68ZE6"
]
…
"Entitlements" => {
"com.apple.application-identifier" => "VYRRC68ZE6.com.example.apple-samplecode.appidprefixtest"
…
"com.apple.developer.team-identifier" => "Z7P62XVNWC"
…
}
…
"TeamIdentifier" => [
0 => "Z7P62XVNWC"
]
…
}
Now how the App ID prefix differs from the Team ID.
The interesting thing is how you managed to ship a Mac app this way. We do not, in general, support unique App ID prefixes on macOS [1]. I think the answer likes in this:
% codesign -d --entitlements - "YourAppName.app"
…
[Dict]
[Key] com.apple.security.app-sandbox
[Value]
[Bool] true
[Key] com.apple.security.files.user-selected.read-write
[Value]
[Bool] true
Previously your app only used unrestricted entitlements, and thus had no need for a provisioning profile.
Note The terms I’m using — unrestricted entitlement, restricted entitlement, and so on — are from from TN3125 Inside Code Signing: Provisioning Profiles.
Nowadays this sort of thing is rare because most apps want to use TestFlight and TestFlight requires the use of restricted entitlements. See TestFlight, Provisioning Profiles, and the Mac App Store.
I’m not sure if Xcode’s automatic code signing is capable of dealing with this case, which suggests two paths forward. The best one, at least in the long term, is to migrate from a unique App ID prefix to using your Team ID. That will eliminate this problem and has numerous other benefits. For example, it’ll allow you to run a beta test programme using TestFlight.
However, there are some potential drawbacks. Specifically, this change could result in confusing privilege prompts for the user, especially if your app uses the keychain.
The alternative is to keep using a unique App ID prefix and abandon automatic code signing. That’s the simplest short-term solution, but it’s obviously suboptimal in the long term.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Because the concept of unique App ID prefixes was deprecated before the Mac App Store was introduced.