Repository navigation
chore: use kqueue on iOS, not FSEvents like on macOS - #4
Merged
Merged
Conversation
Author
|
Note that it appears |
calmh
approved these changes
Feb 7, 2025
calmh
added a commit
to syncthing/syncthing
that referenced
this pull request
Feb 7, 2025
### Purpose On iOS, the FSEvents API for watching files (also used on macOS) is not available, but `kqueue` is. This PR ensures `kqueue` support is built on iOS instead of the FSEvents based watcher implementation. Before this PR, you could already use the `kqueue` build option to force its usage. Unfortunately `gomobile`, the tool that I use to build Syncthing for iOS and macOS for Synctrain, does not support setting different build flags for iOS and macOS (unless I build separately for each, which is a bit of a hassle because XCode nonsense). I am assuming there are good reasons to support FSEvents even though `kqueue` is also available on macOS (but I'm not sure why?). I do know FSEvents has been working fine for me on macOS so it seems best to use FSEvents on macOS and kqueue on iOS. Note that this also requires syncthing/notify#4 to be merged in `synchting/notify` (until that is done, this PR will fail to build on iOS due to `notify` still trying to link to `fsevents` stuff when the `kqueue` build flag is not set). ### Testing I compiled both `syncthing/notify` and syncthing with this PR applied, and used that to successfully build the Synctrain iOS app, which after this PR works fine and should follow up file changes a bit quicker. ### Screenshots n/a ### Documentation n/a ## Authorship Your name and email will be added automatically to the AUTHORS file based on the commit metadata. --------- Co-authored-by: Jakob Borg <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS,
notifyuses the FSEvents API. This is unfortunately not available on iOS. However before this PR, it would be used due todarwinbuild rule also matching iOS.This PR ensures that the
kqueuevariant is built for iOS.