Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 automatically adds unsupported entitlements on compile

I have an app in the Mac App Store, that's been built using the following entitlements for over a year without any issues:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.developer.ubiquity-container-identifiers</key>
    <array>
        <string>$(TeamIdentifierPrefix)com.example.myapp</string>
    </array>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.files.bookmarks.app-scope</key>
    <true/>
    <key>com.apple.security.files.user-selected.read-write</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.print</key>
    <true/>
</dict>
</plist>

Now, when I try to upload my first build using Xcode 6 I got some strange errors from Itunes Connect. What it says is basically:

Invalid Code Signing Entitlements - Your application bundle's signature
contains code signing entitlements that are not supported on Mac OS X; this
may happen if your Mac OS X project was ported from iOS. Please check your
Xcode project's code signing entitlements configuration, and remove any
unneeded entitlements.

Specifically, value "development" for key "com.apple.developer.aps-environment" is not supported.
Specifically, key "com.apple.developer.icloud-container-environment" is not supported.

The thing is, I can not find any reference to these entitlements inside my project. But when I inspect the "Binary and Entitlements" window in the orgnizer I see that Xcode has added these to my requested entitlements.

Where do the entitlements come from and how to resolve the issue?

like image 759
Christoffer Avatar asked Dec 07 '25 10:12

Christoffer


1 Answers

Specifically, value "development" for key "com.apple.developer.aps-environment" is not supported.

This indicates that you are using a provisioning profile that is set up for "development". For push notifications to work you need to use a "distribution" provisioning profile. You can use Ad Hoc if you aren't ready to distribute to the app store.

You did say it's been over a year. Perhaps you had the correct provisioning profile and it has now expired.

Specifically, key "com.apple.developer.icloud-container-environment" is not supported.

There are some changes to iCloud with Yosemite. You may need to edit your App ID in the developer portal and make sure your settings are compatible with the version of OS X you are targeting. After editing the App ID you will need to generate a new provisioning profile for that App ID.

You can also find and edit most of the entitlements in Xcode 6 by selecting the project in the project navigator then selecting the target and go to the "Capabilities" tab.

like image 146
Ken Boreham Avatar answered Dec 10 '25 00:12

Ken Boreham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!