Tact developers released library to work with CloudKit as open source – Canopy.
Canopy helps you write better, more testable CloudKit apps. It isolates the CloudKit dependency so you can write fast and reliable tests for your CloudKit-related features, and implements standard CloudKit-related behaviors.
GitHub: Canopy (documentation)
Reference: CloudKit code from Tact is now available as Canopy open-source library