Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Official frugal and native macOS Syncthing application bundle

License

NotificationsYou must be signed in to change notification settings

syncthing/syncthing-macos

Repository files navigation

Syncthing forumDownloadsLatest releaselicense

Introduction

syncthing-macos project is afrugalnative macOSSyncthing tray application bundle. It bundles its own Syncthing instance and wraps Syncthing background process, making it behave more like a native macOS application and less like a command-line utility with a web browser interface.

Features include:

  • Open theSyncthing WebGUI from the tray in your system preferred browser.
  • Optionally starts on login, so you don't need to set up Syncthing as a service.
  • Tray icon syncthing status indicator.
  • Retina ready icons for the Application bundle and status tray.
  • Automatic updates (usingSparkle pushed from GitHub Releases).
  • Open shared folders in Finder.
  • Log file written to~/Library/Application Support/Syncthing/syncthing.log, use Finder -> Go -> Go to Folder to open it.

Screenshot

screenshot.png

Installation

NOTICE: This is the official Syncthing macOS application bundle. Please make sure you have no othersyncthing instancesorwrappers running or else this application will not work!

Currently, macOS 11 or higher is necessary to run the latest version. For older version support, see theFAQ.syncthing-macos is packaged as a disk image as an application bundled with thesyncthing binary.

To installjust download the dmg, mount it and drag and drop the application to install. The only necessary configuration is to set the API key and URL when provisioning a remote syncthing instance, the local instance is auto-configured. Thesyncthing-macos application bundle disables the auto-updater ofsyncthing as it has its own update mechanism usingSparkle.

The latest version is available atGitHub Releases, or it can also be installed usinghomebrewbrew install --cask syncthing

Why

All cross-platform approaches are not able to use all the native facilities Apple macOS provides. Including auto-updates,vector icon set (retina-ready) and creating an application bundle. GUIs are designed with XCode and everythingis coded in a mix of Objective-C and Swift which is "the native approach".

Goal

The goal of this project is to keep the native macOS Syncthing tray lean but usable. No graphs, no advanced configurationwindows. It provides a very simple wrapper, so users may not be aware Syncthing ships as a command line application. It strives to have a usability of good-by-default and should always follow theApple Human Interface Guidelines to feel as much as a native application as possible.

Known bugs

See the issue tracker (bug tag filtered) for the current status.

Contributions

Contributions andissue reports are welcome.

License

MIT

FAQ: Frequently asked questions

macOS version support

  • From release v1.27.7 macOS 11 or probably higher is required (see issue#218)
  • Last v1.27.6-1 release is compatible with macOS 10.13 (see issue#217)
  • From release v1.20.0-1 macOS 10.13 or higher is required
  • Until release v1.19.2-1 macOS 10.12 is required (see issue#177)
  • From release v1.14.0-1 macOS 10.12 is required
  • Until releasev1.13.1-1 macOS 10.11 or higher is supported (see issue#148 why)

Auto-updatemust be manually disabled for unsupported OS versions.

Preferences

syncthing-macos is designed to run its own syncthing instance and automatically detect the API key.The preferences window is used to point to a local running instance, a remote instance is not supported.It is possible to run your own instance and point to it for advanced/development purposes.You should only change the settings if you know what you are doing.

Setting extra Syncthing command line parameters is a hidden feature. You need to write these usingthe application defaults configuration. The only current limitation the parameters cannot contain spaces!.In the example below the audit log is enabled:

defaults write com.github.xor-gate.syncthing-macosx Arguments '--audit --auditfile=/Users/JohnDoe/staudit.log'

Default IP address change

When the default IP address is changed from 127.0.0.1 to a routable one like e.g 192.168.1.102 the tray applicationpreferences need to be set also. Or else the API cannot be accessed and will stay 'Offline'. If you broke theconfiguration you can manually edit the file under the~/Library/Application Support/Syncthing/config.xml usingFinder with Go -> Go to folder. And restart the syncthing service from the tray.

Resolve xattr sync from macOS Ventura 13.0 to < 13.0 devices (problem withcom.apple.provenance metadata)

When using the xattr synchronisation feature it fails when syncing from macOS 13.0 to macOS < 13.0.When using this feature one must stop Syncthing and manually edit the configuration XML file locatedat/Users/<user>/Library/Application Support/Syncthing/config.xml. Or the location when running anSyncthing daemon instance not managed the application bundle). Manually editing the configuration fileis necessary because the web UI doesn't support xattr filter management just yet (release v1.22.1-1).

Per shared folder thexattrFilter must be configured as follows:

<folder ...>  <xattrFilter>    ...    <entry match="com.apple.provenance" permit="false"/>    <entry match="*" permit="true"/>  </xattrFilter></folder>

NOTE: see thecom.apple.provenancexattrFilterentry.

See also#185 and theforum post for more information.

Uninstallation

On Mac OS X you drop the application from the Application folder to your Trash.But there are some user specific files are kept elsewhere, which are located under$HOME/Library/Application Support/Syncthing. The files in this folder are the configuration,encryption/profile files and the database cache. For more information seedocs.syncthing.net/users/config.html.

Disable automatic update checker

By default the Syncthing macOS application checks automatically for updates. To disable (or re-enable) theauto update check one must set the Sparkle updater parameter from the commandline:

defaults write com.github.xor-gate.syncthing-macosx SUEnableAutomaticChecks 0

This setting is un-adviced and therefor only available from the commandline. When your system is notsupported anymore and don't want to get notified of unsupported updates disabling then is recommended.

Prerequisites for building/using everything in this repository

Before compiling git submodules needs to be present:

git submodule update --init
  • Xcode, for the Objective-C/Swift compiler
  • Python 3, for the update-release.py script
  • Cocoapods for updating Objective-C/Swift 3th party dependencies
  • Golang, only needed for Sparkle GitHub Releases to Appcast XML tool

Using XCode

The newsyncthing.xcworkspace must be used when coding in XCode.

Compiling from Terminal

Build with XCode or run:

make debug

It will automaticly download syncthing universal binary and add it to the Application Bundle.

For release builds signing the application build and creating an distributable DMG:

make release-dmg

The script will select the first available Developer ID and sign the app with it. To specify the signing identity, useSYNCTHING_APP_CODE_SIGN_IDENTITY environment variable:

SYNCTHING_APP_CODE_SIGN_IDENTITY="Mac Developer: foo@bar.com (XB59MXU8EC)" make release-dmg

Design and useful information

Settings

The Syncthing settings use the NSDefaults facility. From the commandline all settings can be shown with:

jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx{    ApiKey = rR7YrEDLKhNETJZKgySmnYPZvebY9qgk;    Executable = "/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing";    SUEnableAutomaticChecks = 1;    SUHasLaunchedBefore = 1;    SULastCheckTime = "2021-01-08 12:05:53 +0000";    SUSendProfileInfo = 0;    StartAtLogin = 1;    URI = "http://127.0.0.1:8384";}

Override Syncthing DaeomonExecutable property (power-users only)

If you want to use the nice GUI but have your own executable located outside theSyncthing.app bundle,then theExecutable configuration parameter can be manually overwritten with thedefaults commandlinetool using builtin Terminal or iTerm2. The last arguments should be changed to the syncthing daemon golangapplication.

defaults write com.github.xor-gate.syncthing-macosx Executable /Users/jerry/develop/Syncthing/exe/syncthing

To restore it back to the bundle path just use delete of the property. It will automatically reset it back.

defaults delete com.github.xor-gate.syncthing-macosx Executable

Dependency management

CocoaPods is used for dependency management. It can be installedwithHomebrew package manager. For more information about CocoaPods readtheCocoaPods Guides.

Versioning scheme

It uses the shipped syncthing executable version appended with a-<bundle index> number.So for Syncthing0.14.28 with first build/package it is versioned as0.14.28-1.Currently there is no need for having a separate version forsyncthing-macos. As it alsokeeps the wrapper tightly coupled with the syncthing releases.

Compilation and packaging process

  • Xcode builds all sources
  • Syncthing resource is fetched withsyncthing/Scripts/syncthing-resource.sh
  • Fancy DMG disk image is generated withsyncthing/Scripts/create-dmg.sh
    • The version part of the DMG name is fetched fromsyncthing/Info.plist, key CFBundleShortVersionString
  • Both the app bundle and the DMG are signed with the first available DeveloperID certificate, if found (or the one specified throughSYNCTHING_APP_CODE_SIGN_IDENTITY environment variable)

syncthing/syncthing-macos will only shipstable releases and no release candidatesof the Syncthing Service (daemon).

Apple Application Notarize

After the dmg is created it must be send to Apple to be notarized. It can be checked withspctlif the app is correctly verified by Apple for distribution:

spctl -a -t exec -vvv /Volumes/Syncthing/Syncthing.app/Volumes/Syncthing/Syncthing.app: acceptedsource=Notarized Developer IDorigin=Developer ID Application: Jakob Borg (LQE5SYM783)

When it is not correctly notarized the following output is seen (note the source):

spctl -a -t exec -vvv /Volumes/Syncthing/Syncthing.app/Volumes/Syncthing/Syncthing.app: acceptedsource=Developer IDorigin=Developer ID Application: Jakob Borg (LQE5SYM783)

See also the Apple Developer documentation athttps://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution

Release management

Runmake update-release from the toplevel Makefile to bundle latest Syncthing from GitHub.

To update the bundled syncthing themake release-update must be run from the main folder which doesbasicly these steps automatically:

  • Updatesyncthing/Scripts/syncthing-resource.sh,SYNCTHING_VERSION

  • Updatesyncthing/Info.plist

    • CFBundleShortVersionString: User readable string (e.g1.27.10-1)
    • CFBundleVersion: Incrementing version counter (e.g102701001 for1.27.10-1)
  • When the git branch develop or release pushed to github the Github actions CI server automatically builds debug and release

  • Manually download the release.dmg fromgithub.com actions which is correctly signed and notarized

  • Manuallycreate a new Github release with tagv<major>.<minor>.<patch>-<bundle index>

  • Run deployment of Sparkle updaterappcast.xml. Which turnsGitHub Releases JSON into a Sparkle appcast.xml file. (See alsoSparkle documentation) to push to users.

Support for additional languages

1. Add Language in Xcode

  1. Opensyncthing.xcworkspace
  2. Select project root ->Project -> Info -> Localizations
  3. Click+ and select target language
  4. Select all files when prompted

2. Translate

Edit files insyncthing/[language_code].lproj/:

/* Keep key, translate value */"Up to date" = "Actualizado";

3. Update Info.plist

Add language code toCFBundleLocalizations:

<string>es</string><!-- New language-->

4. Test

make debugopen ./Build/Products/Debug/Syncthing.app --args -AppleLanguages'(language_code)'

Sponsor this project

 

[8]ページ先頭

©2009-2025 Movatter.jp