Deal with deprecated macOS APIs
We currently use several APIs in the desktop client that have been deprecated since macOS 10.11 (El Capitan) linked to the LaunchServices framework. These are central to some of the setup of the client on Macs, mainly:
- Automatically setting the client to launch on system start-up
- Adding the Nextcloud folder to Finder's sidebar in the "Favourites" section
Since it is only a matter of time since these APIs are fully sent into the sunset, we should probably have a discussion about how we are going to refactor this code.
For setting an app to auto-start on login, Apple provides a new way to do this through the Services Management framework. AFAIK we should be able to use this to get the client to autostart on login, but the downside is that this will mean the desktop client will not appear on the users' list of apps set to autostart on login. This might rankle some. An alternative could also be to not do this programatically and to instead provide a link to open the relevant system settings page so the user can do this themselves.
The second problem is trickier, because Apple has provided no replacement API for programatically adding a folder to Finder's sidebar, at least as far as I've been able to find. This to me suggests they'd rather we not do this at all. The fact that they seem to be have killed sfltool, the command line tool that let you edit Finder's sidebar file lists, and that they also changed the file format for these config files, reinforces that idea. This is not a huge problem for us since we have the system tray provide a link to the Nextcloud folder, and we can just add the user to drag and drop the Nextcloud root folder to the sidebar. We could try to change the Finder config files ourselves manually too if we really really wanted to, though I don't know if we should.
Either way, it's probably a good idea to find a solution for these issues before they stop us from being able to compile the client :)
We have further use of deprecated APIs in the Mac-specific implementation of the Socket API. Working on addressing these
macOS 10.11 (Sierra)
macOS Sierra is 10.12. See https://en.wikipedia.org/wiki/Macintosh_operating_systems#Desktop
macOS 10.11 (Sierra)
macOS Sierra is 10.12. See https://en.wikipedia.org/wiki/Macintosh_operating_systems#Desktop
Oops, nice catch. Changed to El Capitan