Bug 29305 - Apple Watch: unable to publish to App Store
Summary: Apple Watch: unable to publish to App Store
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.9.x (iOS 8.3)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-22 08:04 UTC by Steve Gordon
Modified: 2015-05-18 22:31 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Steve Gordon 2015-04-22 08:04:08 UTC
We're unable to publish our app with new Apple Watch capabilities due to an error we encounter in the publishing process. After reading known issues and workarounds, the issue we're encountering appears to be unique. Specifically, when we publish our archive from Xcode, we see the following error:

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.icloud-container-environment' in 'Payload/MobilligyApplication.app/MobilligyApplication'."

Notably, our entitlement file does not contain the key in question:

<?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>$(AppIdentifierPrefix)com.mobilligy</string>
    </array>
</dict>
</plist>

The problem itself sounds similar to what was reported here: http://forums.xamarin.com/discussion/20775/icloud-app-verifies-in-xamarin-studio-but-not-in-xcode however it appears the bug in question was fixed (https://bugzilla.xamarin.com/show_bug.cgi?id=21486).

We're obviously very interested in arriving at a solution as quickly as possible so that we can release our app soon. This problem is currently blocking our ability to ship our watch experience. Any assistance is greatly appreciated.

Thanks,
Steve
Comment 1 Steve Gordon 2015-04-22 15:48:53 UTC
After much hair pulling and very little sleep, we were able to resolve the above problem. It appears to be unrelated to Apple Watch and instead the result of some change in either a recent version of Xamarin or Xcode.

Previously, we supported the old style iCloud document syncing (to support older versions of iOS). In addition to the above Entitlements.plist, we had also selected the "Compatible with Xcode 5" option in the Developer Portal. This used to work.

Now, if you attempt to use that configuration, you see the error described above. We were able to resolve our problem by doing a few things: 1) Switching to "Include CloudKit support" in the portal, but notably continuing to use our old container name (not prefixed with iCloud.) and 2) Updating our Entitlements.plist to the following:

<?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>$(AppIdentifierPrefix)com.mobilligy</string>
    </array>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array>
        <string>$(AppIdentifierPrefix)com.mobilligy</string>
    </array>
    <key>com.apple.developer.icloud-services</key>
    <array>
        <string>CloudDocuments</string>
    </array>
</dict>
</plist>
This enables us to continue to share the container across iOS versions while not having to handle data migration. I hope this helps others who may encounter this problem.
Comment 2 Miguel de Icaza [MSFT] 2015-05-18 22:31:35 UTC
We have seen a series of problems related to provisioning profiles ourselves.   Those are changes on Apple's side, and we tripped over similar problems.