-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project?Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better iCloud sync integration #424
Comments
Will the data saved with GM.setValue also be synced to iCloud? |
@biuuuNo, not at the moment. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
I just hit this and was confused as to why my scripts suddenly weren't working anymore. Seems like Userscripts doesn't pick up the files when they get evicted until manually downloaded again through Finder. Is this known? |
@2xsaikoAs I wrote. Since the extension does not currently use the iCloud related APIs, we won't know when the system decides to evict a file, and we won't be able to read it again. Thanks for your feedback. |
Sure, but usually, files will download on access, and non-downloaded files are visible in directories. You can see this by opening iCloud Drive in your terminal and e.g. running ls, cat or cp on a couple files. Everything is there, just accessing it might block a few seconds while it downloads, and these commands don't use the iCloud API either. Userscripts doesn't even pick the files up however. |
@2xsaikoCheck out our code, this is how it currently works, if you'd like to debug it, or know of a simple way to improve it, please let us know or submit a PR and we'll be happy to improve the experience. userscripts/xcode/Ext-Safari/Functions.swift Lines 695 to 717 in 7cb1857
|
Ah, that's the NSFileManager API. That might behave differently than the POSIX readdir, not sure. I'm not familiar with native macOS development at all apart from writing a handful lines of Objective-C. Might mess around with it. |
@2xsaikoThe same is true for us, learning native/swift from scratch, building and refactoring the extension. I personally do not currently use icloud sync, and there's a lot more main refactoring to do. Therefore, this issue is not currently on the foreseeable task list, unless someone is willing to investigate and contribute. I will add a label to this issue. |
Well, a simpletest programlists the files and automatically downloads the contents, so something else is going on here. How do you get started with this? I tried just opening the project and running the "Mac" configuration in Xcode (not even sure if that would work for a Safari extension) but it said "No such file or directory" for Resources/_locales, /dist and /images. |
@2xsaikoPlease check:https://github /quoid/userscripts/blob/main/docs/dev.md Those missing parts need to be built by executing the |
There we go:#629 |
Interestingly, one issue should be officially resolved in the upcoming macOS 15 / iOS 18, with an additional menu item "Keep Downloaded" in the iCloud Drive of the new version of the system, which allows you to mark a specific folder not to be automatically evicted by the system. We would like to thank our users (@JOJOforshaun) for providing us with the above information. |
Currently, we tell users in theREADME:
But the current iCloud sync has some doubts for users:
Keep Downloaded
feature introduced in macOS 15 / iOS 18We may need to officially support iCloud features, and the synchronization mechanism and process will be managed by the App.
References:
https://developer.apple /library/archive/documentation/DataManagement/Conceptual/CloudKitQuickStart/Introduction/Introduction.html
https://developer.apple /documentation/cloudkit/
https://developer.apple /documentation/technotes/tn3162-understanding-cloudkit-throttles
The text was updated successfully, but these errors were encountered: