Repository navigation
|
Hi, On macOS, when app's main window became key window, cloud sync works for fetching and sending changes. So, is there a way to make sync changes behavior same as 'when the window becomes key window'? |
Replies: 3 comments 3 replies
|
Hi @diatoming, our methods just call down to the You may need to filed a Feedback with Apple, or perhaps ask on their developer forums. |
|
Here's a relevant post on the developer forums: |
|
We’re seeing the same foreground-dependent sync behavior in Leaf, a native SwiftUI iOS/macOS app using SQLiteData. We reproduced it with 1.7.0 and again after upgrading to 1.12.1, including on a physical Mac outside a VM. Our test:
That wait was ended by our intervention, not by automatic delivery. We have no evidence from this test that the update would have arrived without foregrounding. Both platforms use the same test iCloud account and container. The Mac successfully registered for remote notifications and uses Development CloudKit/APNs entitlements. Its CKSyncEngine lastPushReceivedDate did not advance during the capture. These reports seem relevant:
Is there a supported approach SQLiteData could adopt for reliable change discovery, perhaps through earlier engine initialization or an explicit refresh that preserves its existing merge and pending-write handling? We’d be happy to help with a minimal reproduction. We haven’t established the root cause or implemented either workaround. |
Hi @diatoming, our methods just call down to the
fetchChanges()method onCKSyncEngine, and I too have noticed that it does not actually pull unfetched changes like I would expect. But I'm not sure there is much we can do about it. I think it's just a bug inCKSyncEngine. I've noticed this behavior in Apple's sample code for the sync engine too.You may need to filed a Feedback with Apple, or perhaps ask on their developer forums.