Some time ago, I posted a skeleton Xcode project designed to help others using Swift for scripting macOS. Swift and Xcode have moved on since then, and I have gained more experience. It’s time for a new project to kickstart budding scripters, and perhaps help those who are grappling with the vagaries of Xcode: ScriptBase.
This consists of two components. The first is, of course, the complete Xcode project. You can simply unZip this, place it in your ~/Documents/Xcode folder, and get on with adding your own code. There is a good range of utility functions for calling commands, with and without privileges, and for displaying their output. There are three different controls: a checkbox, a text box, and a button, with a large scrolling text view for the output.
The other item is an 8 page PDF detailing how I made ScriptBase. You can step through this to make your own, and take that through to your own scripting project, or use it to further customise ScriptBase itself.
No copyrights apply. You are free to use ScriptBase as you wish, in freeware, shareware, or commercial products. There is no requirement for any acknowledgement, although they are always appreciated. If you use ScriptBase, I’d love to know what for, and to have your suggestions for any improvements.
ScriptBase 1.0 is available here: scriptbase1
and in Downloads above.