Store some fields in CloudKit unencrypted #244
Replies: 4 comments 18 replies
|
@finnvoor We could definitely support something like: try SyncEngine(
for: $0.defaultDatabase,
tables: RemindersList.self, Reminder.self,
unencryptedFields: RemindersList.title, Reminder.title
)And maybe even a flipped initializer for Can you explain a bit more about your use case, though? What kind of CloudKit querying do you need to do that can't be done using SQLiteData's tools? |
|
I believe CKQuery based subscriptions also do not work with encrypted fields. That is, you can't have a predicate on your query referencing an encrypted field. |
|
Just wanted to add my use-case for making some fields queriable - initial sync on clean install. Use cases:
In all these case, on clean install, first pull latest data for x days. Then let the sync engine do it's thing. I'm assuming, that when filling sqlite with custom pulled data, as they have id's from iCloud, sync engine will later figure it out, that these are the same record. |
|
My case is that I'm sharing a record with someone. When I delete or create a record, I want the other user to be notified as:
I can't recover the record from the database because, when a delete notification is received, the record has already been deleted. Similarly, for a create notification, the record may not have been fetched yet when the notification is processed. The only way to include the title in the notification itself is to add it to It would be nice to at least have an unencrypted version available when needed for cases like this, for example:
|
Uh oh!
There was an error while loading. Please reload this page.
Hi, sqlite-data seems to encrypt every value stored on CloudKit-synced CKRecords at the moment. CloudKit doesn’t support indexes on encrypted fields, so I can't query the CloudKit database using any predicates or sort descriptors (i.e. sort by
addedAtdate). It would be nice if some fields could be marked as unencrypted for use when querying the CloudKit database outside of sqlite-data.All reactions