ggruen / cloudkitsyncmonitor Goto Github PK
View Code? Open in Web Editor NEWMonitor current state of NSPersistentCloudKitContainer sync
License: MIT License
Monitor current state of NSPersistentCloudKitContainer sync
License: MIT License
Thanks for this nice library!
I've noticed that CKContainer.default().accountStatus
does not get a callback in iOS 14.2, which results in always getting a "No Account" status.
Has anybody else gotten this error or is something wrong on my side?
Before I try to implement this package into my project: Does it work for SwiftData too? When using SwiftData and its automatic syncing capability, I don't with CKContainers for example. Will the package still work as if I was using CoreData? Under the hood SwiftData is still CoreData.
Hi and thanks so much for creating this useful tool! I had a view questions I'm hoping you can help me with:
Can you explain a bit more what requirements need to happen in order for "Setup State" to show successful? I ask because I had re-installed my app, successfully re-download all data from iCloud, Import/Export showed Successful but Setup was Not Started. It wasn't until I killed and re-launched that it updated.
I have a user who has just over 100 saved objects on their iPhone in my app, but only 94 are syncing to their iPad. New projects aren't syncing between the two devices, and the status page is reading: Export Failed "CKERRORDOMAIN ERROR 2" -- I can't find much online about this error or what the suggested steps to fix it are. I'm not expecting you to help me troubleshoot, but I'm curious if you've come across this error before and if you've found a successful and repeatable way to address it.
Thanks so much!
Can you please make a short example of how to use this library without a SwiftUI context?
I'd like to implement it in a class, but at this moment I'am a bit confused about the best way.
I know, I know it has only been a day!
None the less, the file SyncMonitor.swift needs import CloudKit
added.
Hi, RE: #24, in cases where an app is not entirely using async await, these warnings are appearing when (for example) this is already being initialized statically from the main queue.
There should probably be a way to initialize this outside of the singleton without requiring this configuration.
Hi, thanks for this package.
I have implemented CloudKit in my app and it’s been working perfectly in iOS 16. However in iOS 17 (Release Candidate) CloudKit sync has been very unreliable, mostly after reinstallation of the app. The sync state is stuck in either “sync not started” or “syncing”. After about 30 minutes, iCloud sync suddenly works until the next time I uninstall and reinstall the app.
I’m really confused as I haven’t faced any problems in iOS 16, only in iOS 17. Is it an iOS bug if it’s stuck on “sync not started” or “syncing” states for long periods of time?
Appreciate your input regarding this matter.
I was looking at this library and noticed that this property, although useful, is not @Published
.... So, in order to catch changes on it, one would need to monitor changes to a half dozen or so other properties.
It seems potentially wasteful (although not terribly) to calculate this in advance for publishing if not used, but it's also a hassle to monitor so many other properties.
Just wanted to ask if there was potentially a compromise here, or if you had best practices in mind regarding this. 😅
When trying to compile the project for Mac Catalyst target I'm getting the following error
'init(localized:table:bundle:locale:comment:)' is only available in Mac Catalyst 15 or newer
'LocalizationValue' is only available in Mac Catalyst 15 or newer
I guess we need to change @available(iOS 15.0, macCatalyst 14.0, OSX 12, tvOS 15.0, watchOS 8, *)
to @available(iOS 15.0, macCatalyst **15.0**, OSX 12, tvOS 15.0, watchOS 8, *)
in the library?
Hi. I'm getting a "Can't return account credentials for account (redacted) because the account needs to verify new terms or is in suspended mode." (and indeed I need to accept new terms) in the logs, but:
iCloudAccountStatus
returns .available
and iCloudAccountStatusUpdateError
is nil
setupState
is failed
but the error is an obscure Error Domain=CKErrorDomain Code=2 "(null)"What can I do to help?
This project is missing a LICENSE
file which means that all rights are technically reserved. Would you consider adding one?
See:
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.