https://testflight.apple.com/join/n3LpOEZ5
If you do test please let me now if you have any suggestions or requests. All feedback is appreciated and will be considered. Even if it is just to say “Hey, it’s working fine” that is appreciated as well. (Richard, you will be happy to know it has buttons AND menus now and you can hide the buttons if you just want a menu driven application. You see, I do take all feedback into consideration
A few things are a bit unusual with this app. I want to highlight the first because of Panos’s contribution to it. We have had discussion on this forum before about accessing files outside the app sandbox (for example, using Privacy & Security settings in System Preferences to “expand” the apps reach to “Full Disk Access” and the like, or using the Open File dialog to allow the user to give temporary permission). Two problems with these methods are (1) the permission is not “sticky”. Each time the user launches the app they have to re-authorize access to the file and (2) for Full Disk Access It won’t work if the app is sandboxed. However, there is a way to use the open file dialog to authorize permission and make it sticky even when the app is sandboxed. It’s called a security scoped bookmark and you can read more about it here:
https://developer.apple.com/documentati ... _sandbox#
Particularly in the section: Persist access to files with security-scoped URL bookmarks
This is where Panos comes in. There are a number of system calls that need to be made in order to implement security scoped bookmarks… ones to save, load, refresh and stop using them. Panos kindly agreed to wrap these calls into a LC extension called, appropriately, securityscopedbookmarks. If you are interested or need further information I am sure he would be happy to oblige.
The 2nd unique feature is another library that Panos created called checkSafari which checks to see if Safari is running using an Apple approved method and again, he wrapped the system call into a LC extension. This one has “Safari” hard coded into it, but could be extended (I think) to work with other applications as well. The point of this extension for SafeSort is I don’t want my app to try writing to the bookmark file while Safari is or might be. So if it’s running I ask the user to close it first so we don’t step on each other — a potential opportunity to corrupt the file. The app also provides an option to create a binary Backup of the bookmarks file. If things go south, you can use the Restore command to restore the original file.
Enjoy, kick the tires and let me know if you have any preference among the 5 different button styles that are implemented in the app.
Cheers and many thanks,
Mark