Skip to content

Latest commit

 

History

History

cktool-cli

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

cktool CLI Samples

Goals

These documents demonstrate how to use the cktool command-line interface to perform various CloudKit container management, data manipulation, and querying operations.

Prerequisites

Setup Steps

Ensure that cktool is available as part of your Xcode installation. You can check by running the following in your terminal:

$ xcrun cktool help

If you see an error that xcrun is unable to find the utility, update Xcode to a version later than 13.0 and check the active Xcode installation with:

$ xcode-select -p

You can change your currently selected Xcode install with, e.g.:

$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Configuring cktool Authentication Tokens

To authenticate with CloudKit you need to provide your CloudKit Management or User Token to cktool. Management operations, such as resetting schema, require a Management Token, while data manipulation and querying operations require a User Token. You can use the CLOUDKIT_MANAGEMENT_TOKEN and CLOUDKIT_USER_TOKEN environment variables to provide these, or using xcrun cktool save-token, following the prompts to save your tokens to the Keychain.

Management Commands

User Commands