CKTool JS
Manage your CloudKit containers and databases from JavaScript.
Overview
CKTool JS gives you access to features provided in the CloudKit Console API, facilitating CloudKit setup operations for local development and integration testing. It’s a JavaScript client library alternative to the macOS cktool command-line utility distributed with Xcode. To learn more about cktool, see Automating CloudKit Development.
With this library, you can:
Apply a CloudKit schema file to Sandbox databases (for more information about CloudKit schema files, see Integrating a Text-Based Schema into Your Workflow).
Populate databases with test data.
Reset Sandbox databases to the production configuration.
Write scripts for your integration tests to incorporate.
The library consists of three main modules:
CKToolDatabaseModule: This package contains all the CloudKit related types and methods, operations to fetch teams and containers for the authorized user, and utility functions and types to communicate with the CloudKit servers. This package also contains operations to work with CloudKit records. You include
@apple/cktool.databaseas a dependency in yourpackage.jsonfile to access this package.CKToolNodeJsModule: This package contains a createConfiguration function you use in projects intended to run in Node.js. You include
@apple/cktool.target.nodejsas a dependency in yourpackage.jsonfile to access this package.CKToolBrowserModule: This package contains a createConfiguration function for use in browser-based projects. You include
@apple/cktool.target.browseras a dependency in yourpackage.jsonfile to access this package.