We have spent past several years working on Tact, which includes working on CloudKit. Over time, we developed some best practices and insights about working with CloudKit.

Today, we are sharing this with you in the form of Canopy library. Canopy is available on GitHub.

Canopy helps you write better, more testable CloudKit apps. The project has three parts.

Libraries

Libraries provide the main Canopy functionality and value. Canopy is the main library, CanopyTestTools helps you build tests, and CanopyTypes provides some shared types used by both.

Canopy source is available at github.com/Tact/Canopy.

Documentation

The Canopy documentation site at https://canopy-docs.justtact.com has documentation for the libraries, as well as information about the library motivation and some ideas and best practices about using CloudKit. The documentation is generated by DocC from this repository, and can also be used inline in Xcode.

Some highlights from documentation:

Canopy motivation and scope

Testable CloudKit apps with Canopy

iCloud Advanced Data Protection

Example app

The Thoughts example app showcases using Canopy in a real app, and demonstrates some best practices for modern multi-platform, multi-window app development.

More info about Thoughts example app