Post

Replies

Boosts

Views

Activity

Comment on Can someone explain why this state property is nil despite being updated before the other state property?
@darkpaw I reintroduced in my project isProcessingShare state property to reflect sharing progress and now the sheet shows up correctly the first time. Likewise, if from official Apple CKShare demo app I merely remove isProcessingShare then official Apple demo app stops working. I think Apple demo app is poorly designed that for CKShare to work there needs to be progress redrawn.
Aug ’24
Comment on Can someone explain why this state property is nil despite being updated before the other state property?
@darkpaw Still the same behavior - I see "No sheet to show": Here is what I changed: DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { print ("Setting showingShare to true at \(Date.now.timeIntervalSince1970)") showingShare = true } entered shareConfiguration at 1724105717.827956 returning from shareConfiguration at 1724105718.080661 Setting showingShare to true at 1724105721.139563
Aug ’24
Comment on Can someone explain why this state property is nil despite being updated before the other state property?
Isn't await keyword supposed to serve as synchronization point and line after it executed only when current line is await-ed? FWIW I added following prints to dump time: entered shareConfiguration function at 1724102594.9793549 returning from shareConfiguration function at 1724102595.200552 setting showingShare to true at 1724102595.200789 <-- this is logged just before setting showingShare to true.
Aug ’24
Comment on Managing Duplicate Objects in Core Data (or SwiftData) with CloudKit Sync When Devices were Offline during object creation
Thanks for the pointers. I forgot to mention that in my example, the firstName and lastName fields are not mutable, and the combination of these fields is guaranteed to be unique (i.e., there can only be one John Smith). The age field, however, is mutable. Given this constraint, I believe there could be a more elegant sync approach than the "Create duplicates in CloudKit and delete one" method if only it would be possible for me to set recordName as I wish.
Aug ’24
Comment on Do CloudKit subscriptions work from command line tool application?
Yes, my usage of word "daemon" was a little ambiguous. I meant it in context of anything that runs without UI. Whether launchd daemon or launchd agent. But CKSyncEngine has following event hook - accountChange(CKSyncEngine.Event.AccountChange) - wouldn't presence of this hook imply that CKSyncEngine (and hence also CloudKit subscriptions) could in theory work also from launchd daemon? At least when particular user signs in on MacOs?
Aug ’24
Comment on Do CloudKit subscriptions work from command line tool application?
Yes, my usage of word "daemon" was a little ambiguous. I meant it in context of anything that runs without UI. Whether launchd daemon or launchd agent. But CKSyncEngine has following event hook - accountChange(CKSyncEngine.Event.AccountChange) - wouldn't presence of this hook imply that CKSyncEngine (and hence also CloudKit subscriptions) could in theory work also from launchd daemon? At least when user signs in on MacOs?
Aug ’24