I'm writing an app that uses CloudKit and also a local database (SQLite) so the app can function without internet. It's a challenge. I'm sure I'm re-inventing some wheels. I’m curious … anyone know of any good books about architecture or design patterns for this kind of thing?