Beta test my new iOS app for Syncthing

Over the past few weeks I have been developing Synctrain, a new Syncthing client for iOS. In addition to an iOS-native user interface, it offers selective synchronization and on-demand streaming of media files (see for details here). This is very useful as mobile devices are often limited in storage. Synctrain allows on-demand access to synced files securely without e.g. a VPN. Synchronized files and folders are available through the iOS Files app and can be opened with other apps. Changes can also be synced back (if enabled) and synchronization can happen in the background as well.

Note that this is still in heavy development. Functions such as background synchronization will need some further tuning (i.e. don’t complain if it drains your battery!). Also it needs to still be tested in various edge cases. I hope to eventually be able to publish this on the App Store.

For now, I can offer 50 testers access to a pre-release version through the link below. **Important: ** this is pre-release software. Do not use it with sync folders that you cannot afford to lose, and always make a back-up. Looking forward to your feedback.

6 Likes

Is it open source?

Not currently. My current thinking is to eventually publish as open source, as well as offer the app on the App Store for a small fee (users would then be able to either (1) compile the app themselves or (2) pay for the convenience and any support through the App Store).

The minor modifications to Syncthing core are already available here: GitHub - pixelspark/syncthing at sushi (handful of commits on top of the MobiusSync iOS fork).

Awesome. Then I suggest you come back when it is, and in the meantime find your own platform for marketing. Also, make sure to provide credit where required and appropriate.

3 Likes

This app is now fully open source (MPLv2) :slightly_smiling_face:

A first version has been approved by Apple. It can be tested right now through TestFlight.

Unless any serious issues are found, this version will be released as a free app on the App Store next week. A new version will also soon arrive on TestFlight (v1.1).

6 Likes

Sweet. I joined the Testflight and I’m positively surprised at how slick it is for the short time it’s been in development. I could connect to my devices, browse files, and look at a couple of photos. :+1:

2 Likes

The HTTP server for downloading/streaming files on demand (sushitrain/SushitrainCore/src/server.go at main · pixelspark/sushitrain · GitHub) looks interesting - also outside of the scope of the iOS app. I’m wondering whether it would make sense to add such an endpoint to the regular REST-API of Syncthing. I suppose other GUIs/integrations could benefit from it as well, e.g. Syncthing Tray already provides a browser for the global file tree as I also want to add selective sync via ignore patterns. However, adding an action to download a single file from there would maybe be useful as well.

2 Likes

I think that would be very useful (not really for the iOS app though as it integrates with the Syncthing code directly from Go and disables the full REST API and GUI).

As for selective sync, check out folder.go in the iOS app code. Search for ‘selective’, ‘selected’ and ‘extraneous’ to see how I implemented this. Perhaps a similar approach is useful for your app:

  • A folder is ‘selective’ if the .stignore file contains only patterns starting with ‘!’, and the last pattern is ‘*’ (so: everything is ignored, except for specific paths). There may also be zero paths with ‘!’ (in that case the app still has access to the global file tree and provides the on-demand option only)
  • A file or subdirectory is ‘explicitly selected’ if it is mentioned in the .stignore with a ‘!’ pattern. Deselecting means removing the path from .stignore.
  • A file or subdirectory is ‘implicitly selected’ if a parent folder is explicitly selected. For these, the explicit selection status cannot be changed in the app right now to avoid confusion for the user.
  • When a file is ‘deselected’ (either explicitly or implicitly) it will not be removed by the app. Instead the app will show these as ‘extraneous file’ (file that is locally stored but not supposed to be there according to the selection). The user can decide to remove the file or add it (and then sync. The app mentions ‘overwrite existing’ when such file also exists globally).
  • When a new file is placed inside a selected subdirectory, it will synchronize like normal. Same goes for deleting or renaming - it works as it would in a regular folder.
  • When a new file is placed not inside a selected subdirectory, it will appear as ‘extra’ file in the app and the user needs to decide what to do.
  • When a file is renamed outside a selected folder this is currently treated as a delete+create, as there is no way to detect renames properly on iOS. This hence removes the files from other peers (for sendreceive folders) and prompts the user about the ‘extra’ file.
  • The app disallows changing the folder ‘selectiveness’ and folder types while the folder is synchronizing and while there are still extraneous files detected.

Currently the app does not support additional ignores (you cannot e.g. ignore ‘.DS_Store’ files everywhere and also have the selective sync), again because of complexity and not confusing the user. However it should be compatible with this approach.

1 Like

I love the app. Please consider the possibility to give the folders a human readable ID, instead showing just the folder ID, thank you.

You can give it any ID you like.

In 1.1 build 2 now on TestFlight, you can set the display name for folders inside the app.

The folder name on disk cannot be customized yet, will put it on the wishlist.

Except we already have established folders with cryptic names that we don’t want to have to recreate from scratch and resync just to change the ID because we can’t give it a name like we can on all other syncthing devices.

I possibly misled them by saying “human readable ID” when I really meant “human readable display name”.

Hi, any way to put a custom location for folder syncing?

What I am trying to learn is how to sync photos (from default Photos) on an iPhone because it doesn’t allow the default save location to be changed.

If you put a custom config.xml (and/or custom cert/key) in the ‘Synctrain’ folder and restart the app, it will pick that one up and use it instead of its internal config file. You are fully on your own if you use this however.

Access to photos is not possible from either the Files app or from Synctrain, and photos are always saved inside the Photos app. Mobius seem to be building a photo sync feature that accesses the Photos app through its APIs and present those to Syncthing, perhaps check that out.

My own workflow for photo sync uses a Shortcuts automation that does the following:

  • Find all photos in the Photos app
  • Filter photos that are not present in the local ‘Ingested’ photo album
  • For each of these photos:
    • ‘Export unmodified original’ to a Synctrain folder
    • Add photo to ‘Ingested’ album so it’s not saved the next time

Then start Synctrain and synchronize your photos. Note that for some reason this doesn’t work with slow motion videos (but you can save those manually of course and add to ‘Ingested’ to make the script skip them). If it helps I can share the automation.

In other news, version 1.1 of the app has been approved on the App Store, with many improvements.

5 Likes

Thanks man! Will look into it :slight_smile:

@pixelspark Do you want to enable issues on GitHub - pixelspark/sushitrain: Securely synchronize files with your devices on iOS using Syncthing or get feedback here?

Two items:

  1. All three panes: start, devices and folders will show “Not connected” for about 10 seconds, then switch to a green “Connected” for 0.5 seconds (folder pane says “Synchronized”), then switch back to “Not connected”.

  2. Also, can you add the version number to the about modal?

Any problems or suggestions can be discussed here or in the discussions section on Github. Any technical feedback can be sent through TestFlight.

This usually happens when the other devices have not yet accepted your mobile device and/or the folder hasn’t been shared on that side yet. Please check if this is all configured. If you are using encrypted peers, also check the encryption password. Logging on the other devices may be of use as well.

Will consider for the next version.

1 Like

Would be great if you could share this automation, thanks in advance