The development commenced in December 2020 and the next release of RsyncOSX will be sometime before summer 2021. The next version is build for macOS Big Sur only.

The name of the new version is a working name. The code will be merged into the RsyncOSX repository when the new version is released.

SwiftUI is a framework for UI. Compared to a Swift, Storyboard and View Controllers application, the numbers of codelines to create the UI with SwiftUI is minimal. Programming the UI in SwiftUI is declarative and not imperativ. The code for the model part is traditional Swift code.

And to be honest, the future of RsyncOSX is SwiftUI. And it is really fun to code in SwiftUI. The code for UI is minimal and separated from the Model (MVC). By hiding application logic and actions in properties, functions and closures will simplify the code and make more easy to read. The declarative paradigm makes the code for the UI clean and easy to follow.

Prerelease (test) of new version

The final version is not to be released before closer to summer 2021. Most of the core basic functions like executing tasks, compute the parameters to rsync are reused code from the current version. And most of the executing part within the prerelase is stable and working.

There is released a version to test out 24 February 2021. Be aware of the prerelease is compiled for release on macOS Big Sur only. To install, open the DMG file, check the shausum and copy the app to any catalog on your Mac.

The prerelase is signed and notarized. The command shasum -a 265 print the following shasum.

RsyncSwiftUI 0.2.dmg: 6e39341790f35eb5802ce7655be61658e15550513fefedba47e912271d578d07

What is working

There are lot of reused code within the Model part, but all of the code for UI is new. That means the UI is also changed, to the better in my opinion. The reused code is classes like reading and saving data to permanent store, execution of tasks, logging of execution of tasks, scheduling and so on. There is, for the moment, no administration (create, edit and delete) of configurations, schedules and logs. The prerelease reads the current default profile and other profiles created by RsyncOSX. If you want to test the prerelease version, please use RsyncOSX to administrate (create, edit and delete) configurations. The prerelease can be used alongside the existing version of RsyncOSX.

The following is in the prerelease (updated as new features are implemented):

  • reading configurations, either as JSON or PLIST files
  • estimation and executing single tasks
  • estimating and execution of all and selected tasks
  • executing (no estimation) of selected or all tasks
  • view output from rsync, either from singletasks or aggregated data from multiple tasks
  • view logfile
  • the error handling is refactored and enhanced compared to the current version
  • setting user selected values
  • setting ssh global values

Not in prerelase but in development:

  • validate and add new configurations
  • delete configurations

To summarize most of the executing part is in code and it works.

What is not yet implemented

The following is not yet implemented:

  • administration (create, edit and delete) of configurations, schedules and logs
  • restore of data
  • execution of shellout tasks, configurations with pre and post shell scripts
  • administration of parameters to rsync
  • administration of snapshot tasks
  • shortcut codes for various tasks
  • no start or stop of the menu app for scheduling of tasks
  • not yet localized, but prepared for it

All the above will gradually be implemented in the new version.

The source code

The source is available on my GitHub account. If you have any comments or ideas please use the discussion part for RsyncSwiftUI.

A few screenshots

The UI will change as the development continues, but the overall structure of the new version will be like the views below. The default view when starting the app. Select a new profile any time and the app reloads the data.

The start might be Multiple tasks. Choose Estimate and then Execute after estimation is completed. The estimation marks tasks with data for syncronizing. Or just go for all tasks, no estimation and execute direct. An example of how easy it is too create the UI is the Estimation View. There are approx only 60 lines of code for the layout of the estimation view (below).

If you want more control, select Single tasks. Choose either Estimate and Execute or Now, which executes without estimation.

Viewing the parameters to rsync for one task. The user can (when the app is released) set any setting to rsync.

Within the Multiple tasks menu selecting Estimate kicks off estimating of all tasks. Any task with data for syncronizing, transfer and delete, are marked.

Selecting the Execute kicks off the actual syncronizing tasks. For each task there is presented the progress. There is also presented the overall progress of number of tasks executed.

Showing logs for one task.

Some user settings.

SSH settings and a few others.

Resources to learn SwiftUI

There are a lot of resources to learn SwiftUI. Google, Stack Overflow, YouTube and GitHub are amongst the most used resources. I am also following a few blogs like:

Another important aspect of SwiftUI is the single source of truth. Single source of truth is also an important part of the MVC architecture.