"Use Default Container" Doesn't Show in Icloud Capabilities

Use default container doesn't show in iCloud Capabilities

This changed in Xcode 11, there no longer is a default container checkbox.

Instead you have to create your own container. Just press the + and enter your bundle-id. Xcode will automatically prefix it with iCloud.

So the result will be iCloud.<your app’s bundle ID>, the same as the default Xcode used previously.

This seems to be a useful tutorial, updated with changes in Xcode 11: https://www.raywenderlich.com/4878052-cloudkit-tutorial-getting-started

Xcode not creating default container for iCloud and CloudKit: Add the iCloud containers entitlement to your App ID fails

I just went through this and fixed it by generating a new development provisioning profile and downloading it using Xcode (Preferences -> Select Account -> View details -> Download)

When the App ID changes, the existing development provisioning profile is invalidated.

Once you create a new development provisioning profile and import it, the error should disappear.

What's happened to the default iCloud container in Xcode

From what I gather from Apple's response to my report on this, this change is intentional.

Xcode not creating default container for iCloud and CloudKit: Add the iCloud containers entitlement to your App ID fails

I just went through this and fixed it by generating a new development provisioning profile and downloading it using Xcode (Preferences -> Select Account -> View details -> Download)

When the App ID changes, the existing development provisioning profile is invalidated.

Once you create a new development provisioning profile and import it, the error should disappear.

Xcode Error - Profile doesn't include the com.apple.developer.icloud-container-environment entitlement

Here's how I fixed it:

  1. I created an iCloud container on the CloudKit dashboard (in the iCloud section of the Signing & Capabilities in Xcode).

  2. I assigned the newly created container to my app (Developer Website > Certificates, Identifiers & Profiles > Identifiers > my app ID > Capabilities > iCloud > Edit button) and saved the app ID configuration.

  3. Then I created a new App Store provisioning profile for this app ID and used it to manually sign the app when I uploaded it in Xcode.

iCloud turned on in Xcode, but not app store connect. How to fix?

I've figured out the essential issue here: I was confusing what is, basically, two different iClouds (or at least two very different ways to use iCloud as a developer).

This will be obvious to many/most people familiar with iOS programming, but it was the key point I did not grasp.

Without this information, I was thrown off by some people saying iCloud just "automatically works", while others would go into depth about the need to do configuration. They both were right--just talking about different things.

So this is what I did not grasp before: These are the two different uses of iCloud from the developer perspective:

1) Automatic, backup iCloud. This is the system-wide feature, that allows users to back up data from their device. Users turn it on through turning on “iCloud Backup” (settings --> apple id --> iCloud). Once on, the device automatically backs up the user's data regularly. This feature will automatically back up data from your app that is included in the app/Documents directory. Further info here.

See here for details on preventing certain data from being backed up if you want.

Other than putting data you want backed up in the system wide back up in the documents director, there is nothing you as an app developer need to do. You do not even need to enable iCloud through Xcode (I think--though others please correct me if I am wrong).

This will not load data from iCloud onto your app when the app is loaded. Rather, it saves a backup (of your app data and the other data on the user's phone)--the main benefit of which is that if the user loses their device they can recover that data on a different device.

2) App specific cloud storage through iCloud. This affirmatively does not happen automatically, and requires meaningful configuration.

This is where you can use iCloud like a backend cloud solution. For example, you can send specific data to iCloud when that data is created, and then later get that data from iCloud onto the app when the user loads the app (instead of storing that data locally on the user's device).

This is where CloudKit comes in.

To enable this, you need to generate the proper entitlements file--such as enabling iCloud w/ CloudKit on Xcode, and being sure the app id and provisioning profile confirm that CloudKit is enabled. For a bit more detail, see my steps 1 through 7 in my question. This should work to get things "enabled".

But that is just the first piece, you then need to get things "configured". To do this, you likely have to do some configuration of the container that CloudKit generates for your app, and add code specific to the backend process in your app. There is some good info in the tutorial linked in the prior answer.

Thanks to those who gave info on this, including Apple Developer Technical Support.

Add the “iCloud containers” entitlement to your App ID

I was having the same problem couple of days ago. Fixed it by doing these steps:

  1. Go to your developer account
  2. Find the App ID you are working on
  3. Click edit.
  4. On the iCloud section select the radio button that says "Include CloudKit support (requires Xcode 6)"
    Sample Image

Worked for me.



Related Topics



Leave a reply



Submit