iCloud Capabilities

PDF for offline use

Let us know how you feel about this

Translation Quality


0/250

last updated: 2017-03

Adding capabilities to an application often requires additional provisioning setup. This guide explains the setup needed for iCloud capabilities.

iCloud provides iOS users with a convenient and simple way to store their content and share it between devices. There are four ways that developers can use iCloud to provide a means of storage for their users: Key-Value storage, UIDocument Storage, CoreData, and using CloudKit directly to provide storage for Individual files and directories. For more information on these, refer to the Introduction to iCloud guide.

Adding the iCloud capability to an application is slightly more difficult than other App Services because of containers. Containers are used in iCloud to store information for an app, and allow all information contained in a single iCloud account to be segregated – like the sandboxing on a user’s iOS device. For more information on containers, refer to the Introduction to CloudKit guide.

Xcode

The steps in section Adding App Services above can be used to toggle the required iCloud capability. Depending on which means of storage is being used in your app, you may need to do additional setup. The image below shows the iCloud capabilities pane:

iCloud Capability section

First select the required service. If iCloud Documents or CloudKit have been selected, you must select a container. Selecting the default container will create a new container that is unique to the app. Alternatively, if you have created a container either via Xcode or the developer portal, select it here.

Developer Center

When provisioning a new app through the developer center there are two steps that need to be taken:

  1. Create a container.
  2. Create an App ID with the iCloud capability and add the container to it.
  3. Create a Provisioning profile that includes this App ID

The steps below will guide you through these steps:

  1. Browse to the Apple Developer Center and go to the Certificates, Identifier, and Profiles section:

    Apple Developer Center main page

  2. Under Identifiers select iCloud Containers, and then select the + to create a new container:

    iCloud Container screen

  3. Enter a Description and a unique Identifier for the iCloud container:

    iCloud container registration screen

  4. Press Continue, ensure that the information is correct, and press Register to create the iCloud Container:

    iCloud container registration screen

To create a new App ID and add a container to it, do the following:

  1. In the Developer Center, click on App IDs under Identifiers:

    Identifier Section in Developer Center

  2. Select the + button to add a new App ID:

    Add new App ID button

  3. Enter a Name for the App ID and give it an Explicit App ID:

    Enter new App ID details

  4. Under App Services select iCloud and choose Include CloudKit support:

    Select iCloud app services

  5. Select Continue and then Register. Note that on the confirmation screen, iCloud will display with Configurable selected, with a yellow symbol:

    Confirmation screen

  6. Return to the list of App IDs and select the one that you have just created:

    Select App ID screen

  7. Scroll down to the bottom of this expanded section and click Edit:

    Edit App ID

  8. Scroll down the list to iCloud and click the Edit button:

    Edit iCloud App ID

  9. Select the Container to use with this App ID:

    Select container screen

  10. Confirm the Container assignments, and press Assign.

This App ID can now be used to generate, or to re-generate, a new provisioning profile.

For more information on using iCloud, refer to the following guides:

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.