That
WriteAuxiliaryFile step is effectively copying the
.entitlements file from your target to the
DerivedSources sources directory. If the destination file has
com.apple.developer.game-center, it’s almost certain that the source file has that set too.
Earlier you wrote:
But I'm curious since I'm pretty sure my App.entitlements does not
contains Game Center lines.
The most likely explanation here is that you’re looking at the wrong
.entitlements file. Check the Code Signing Entitlements build setting (
CODE_SIGN_ENTITLEMENTS) to confirm that you have the right file.
Also, consider this:
Create a new project from the iOS > Single View App template.
Configure code signing in Signing & Capabilities.
Add the Game Center and Keychain Sharing capabilities (you don’t need to add any keychain access groups, just add that capability and leave it empty).
Build.
You’ll see that the
keychain-access-groups entitlement flows through
.xcent file as expected. However, there’s no mention of the
com.apple.developer.game-center entitlement at all. If you dump the app’s entitlements you’ll see this:
Code Block % codesign -d --entitlements :- Test657552.app |
… |
<dict> |
<key>application-identifier</key> |
<string>SKMME9E2Y8.com.example.apple-samplecode.Test657552</string> |
<key>com.apple.developer.team-identifier</key> |
<string>SKMME9E2Y8</string> |
<key>get-task-allow</key> |
<true/> |
<key>keychain-access-groups</key> |
<array/> |
</dict> |
</plist> |
And the profile’s entitlement allowlist shows this:
Code Block % security cms -D -i Test657552.app/embedded.mobileprovision |
… |
<dict> |
… |
<key>Entitlements</key> |
<dict> |
<key>application-identifier</key> |
<string>SKMME9E2Y8.com.example.apple-samplecode.Test657552</string> |
<key>keychain-access-groups</key> |
<array> |
<string>SKMME9E2Y8.*</string> |
<string>com.apple.token</string> |
</array> |
<key>get-task-allow</key> |
<true/> |
<key>com.apple.developer.team-identifier</key> |
<string>SKMME9E2Y8</string> |
</dict> |
… |
</dict> |
</plist> |
Again, no mention of
com.apple.developer.game-center. This is because Game Center isn’t a real entitlement. Rather, Game Center is available to all apps use an explicit App ID provisioning profile.
You’ll see this reflected on the developer web site. If you go to create a new App ID, you have two options:
In the former case, Game Center > iOS is always checked. In the latter, it’s always unchecked.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"