How does "Messages in iCloud" work and does it help with export?
Starting with iOS 11.4 in 2018, Apple introduced "Messages in iCloud," a synchronization system that stores complete message histories in iCloud and keeps them consistent across all your Apple devices. This feature fundamentally changed how iMessage data is stored and synchronized, with significant implications for message export.
CloudKit Architecture
Messages in iCloud uses Apple's CloudKit framework, a structured storage system designed for synchronizing user data across devices. All message data is stored in your private CloudKit database, ensuring only your authenticated devices can access message content. The synchronization uses CKSyncEngine, which tracks all local changes—new messages, deletions, read status updates—and uploads them in batches when network conditions are favorable.
System-Controlled Synchronization
Unlike traditional sync systems where apps can force immediate synchronization, CloudKit sync is system-controlled. iOS decides when to actually upload changes based on network connectivity quality, battery state (Low Power Mode pauses sync), thermal conditions, and background task scheduling priorities. This means sync may not happen immediately even when changes occur.
Encryption and Security
Messages in iCloud maintains end-to-end encryption through CloudKit Service Keys protected by iCloud Keychain syncing. When you enable Messages in iCloud, the system generates a CloudKit Service Key that encrypts all message content before uploading. This key is stored in iCloud Keychain, which uses its own end-to-end encryption. When a new device signs in, it must pass iCloud Keychain authentication before it can decrypt message content.
Impact on Export
Messages in iCloud actually makes export more complex. When local device storage fills, iOS automatically deletes older message content and attachments, retaining only recent messages locally. These are re-downloaded from iCloud on-demand when you scroll back in conversation history. This means your Mac's local database may not contain your complete message history—some messages exist only in iCloud. Tools like TextKeep export what's stored locally in the chat.db database, but iCloud-offloaded attachments will show as placeholders rather than actual files.
To ensure complete export, you may need to scroll through all conversations in the Messages app to force download of older messages from iCloud before running the export.
Download TextKeep for Mac