Today we’re pleased to announce that AgileCloudKit is officially open source and available on GitHub . AgileCloudKit is a framework that we’ve built for the purpose of bringing iCloud Sync to the AgileBits Store version of 1Password. AgileCloudKit allows us to take our existing iCloud Sync solution and make it work outside the Mac App Store.
Get the Code
Enough with the pleasantries, let’s get to it! All of the code is up on GitHub . The repository includes the framework, two sample apps (one using CloudKit, the other using AgileCloudKit), and instructions on how to get set up.
Using both CloudKit JS and CloudKit REST Services, AgileCloudKit is a drop-in replacement for the official CloudKit framework. Its core functionality is compatible enough that for our sync code, the only difference between it and CloudKit is which framework header we import. The gap is a little wider for sync setup, because OS X and iOS handle all the authentication automatically when using CloudKit.
When using CloudKit JS or the REST Services, authentication is not handled automatically. In this case, AgileCloudKit brings the user to the CloudKit authentication page in their browser. After a successful login, an authentication token is returned to the app.
The differences in authentication required us to modify how sync is configured in 1Password, but thankfully the changes we had to make were fairly minimal.
One of the many benefits of using AgileCloudKit is that developers can target either the development or production CloudKit container, which is invaluable for debugging issues in a production environment.
The first stage of AgileCloudKit development was to simply build this thing for our own purposes. It was important to us that we explain to our users how we managed to get iCloud Sync outside the Mac App Store; announcing the framework a few months ago was our way of doing that.
The next phase was to get more real-world experience with the framework and to fix issues as they came up. We’ve been refining AgileCloudKit and we’re really happy with how it’s working out so far, and we think it’s ready for others to use it.
We’re now entering the third phase of AgileCloudKit development. This is where we would love all you app developers to get involved. AgileCloudKit contains implementations of every CloudKit class that 1Password uses, which is the majority of them. See our GitHub project page for a list of classes that are not implemented. We’d love for AgileCloudKit to implement 100% of the CloudKit API.
We used both CloudKit JS and CloudKit REST Services to implement AgileCloudKit. CloudKit JS is almost always the quickest way to get something built, but the REST services allow more flexibility. We’d love to see more code converted to using only the REST services, with the goal of one day breaking the dependence on any main-thread processing.
For general feedback, leave a comment below or e-mail us at firstname.lastname@example.org . If you have questions or comments on implementation, or if you find a bug, please file an issue in the repo .