ember-cloudkit
ember-cloudkit copied to clipboard
Easily use CloudKit from an Ember.js app
ember-cloudkit
Installation
ember install ember-cloudkit
Setup
Note: CloudKit requires SSL to be used, thankfully you can use ember serve --ssl
Read Apple's CloudKit Quick Start guide, CloudKit.js documentation and sample application for more information.
The iCloud dashboard is where you'll generate an API key and the schema for your application.
ember-cloudkit expects you to provide configuration inside of config/environment.js like this:
ENV.cloudkit = {
containers: [{
// Change this to a container identifier you own.
containerIdentifier: 'iCloud.com.myapp.foo',
// And generate an API token through CloudKit Dashboard.
apiToken: 'your API token here',
auth: {
buttonSize: 'medium',
persist: true // Sets a cookie.
},
environment: ENV.environment
}]
};
Usage
As a convienience, ember-cloudkit provides an ES6 module shim for the CloudKit global:
import CloudKit from "ember-cloudkit"