Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Code Signing Entitlements for iCloud, Core Data and Xcode 6.01 with iOS 8

I have an existing app in the App Store which works very well with iOS 7 and 8. It's an app that uses Core Data to store information added in from the user, as well as iCloud for synching (no key-value storage).

With Xcode 5.1.1, everything works very well. I've just spent some time releasing an urgent timezone fix for my users, so the fix has nothing to do with iCloud and Core Data. Since the release of Xcode 6.0.1 and the iOS 8 SDK, I went forward and started using that.

When it came to validating my app this morning, I received the following error:

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

Within the Developer portal, my App ID has iCloud enabled, but only for Xcode 5 because I don't want to use CloudKit just yet:

enter image description here

Within the section of Xcode, in Xcode 6 I now see the following, as would everyone else:

enter image description here

With My Entitlement Folder. So in my case, it's something like 82828282.com.company.app and that's in RED in the Capabilities section.

enter image description here

I don't quite get what I'm supposed to do to get this working.

Questions

1) Am I supposed to use CloudKit?

2) Do I have to enable CloudKit in the App ID of the Developer Portal?

3) Am I supposed to use iCloud Containers in the Developer Portal?

My current iCloud set up is to use entitlements : TeamID.identifier.

I've worked around this by submitting the app from Xcode 5.1.1 because it's an urgent fix, but I just don't understand what to do to progress with using the iOS 8 and Xcode 6.0.1 for future development, with iCloud and Core Data still very much enabled in my app.

I have seen some similar cases within SO, like here (iCloud Core Data Not available after running in Xcode 6 / ios 8 SDK) and Using Core Data, iCloud and CloudKit for syncing and backup and how it works together but I'm really not sure what to do.

Any guidance at all would really be appreciated.

like image 896
amitsbajaj Avatar asked Sep 29 '22 19:09

amitsbajaj


1 Answers

If you want to keep using the old Ubiquity container format (the one that begins with your $(TeamIdentifierPrefix)) after Xcode 6 have updated it to a iCloud container, you have to:

  • Go to Certificates, Identifiers & Profiles page in the Apple's member centre and set "Compatible with Xcode 5" in the iCloud settings of your App ID -it seems that you have already done that.

  • Make sure that there is not any "com.apple.developer.icloud-services" key or "com.apple.developer.icloud-container-identifiers" key in your entitlements file.

  • You may need to regenerate all the provisioning profiles that use this App ID.

like image 174
Sergio DomingoHernando Avatar answered Oct 05 '22 06:10

Sergio DomingoHernando