Game Development Reference
In-Depth Information
How to do it…
In this recipe, we will learn about the steps to enable CloudKit in our app. CloudKit is an
app service provided by Apple. It is only available for the apps distributed by the App
Store or the Mac App Store. CloudKit requires some additional configuration to be done
from our Xcode Project. Our app must be provisioned and code signed to access the
CloudKit service. So we will enable CloudKit for our FlyingSpaceship game. Perform the
following steps to enable CloudKit in the Xcode project for our game:
1. Open the Xcode Project (FlyingSpaceship) in which we want to enable and use
CloudKit services.
2. Click on the
Project
in the Project Navigator and we can see the
General
section
selected.
3. Select the
FlyingSpaceship
target and then select the next section
Capabilities
.
4. Now, click on the first row, that is,
iCloud
and a section similar to this will open:
5. Now, on the right-hand side, switch to iCloud and some loading will occur.
6. Once the loading has finished, the iCloud will be enabled and giving options as
shown in the following screenshot: