Calling shell commands, including with privileges, NSBackgroundActivity, XPC Activity, and writing shell commands in Swift.
scripting
Dates with (NS)Date and DateFormatter, writing messages to Sierra’s unified log, and working with old Objective-C interfaces.
Reading and writing preference files, storing data in property list files, and reading JSON data.
Alerts, open and save file, text boxes, radio buttons, popup menus, steppers, read and write in NSDocuments, and much more.
Swift 3.1 code snippets for string manipulation, working with attributes in attributed text, and with arrays.
Covers new series of Swift Snippets articles, with links to those articles, other relevant ones here, and the whole series in a Tinderbox document.
A classic scripting task: iterate through a folder and its entire contents, testing to see if each file is readable or writable. It’s straightforward in Swift too.
There are lots of different ways to modify a string, but some would turn out to be very inefficient. A gentle wander through CharacterView and a mapping closure.
A simple and elegant way to eliminate duplicates from an array of strings comes and goes as Swift 3.1 takes charge.
How T2M2 analyses Sierra’s log to assess how backups have been working. With insights into using NSDate, NSStepper, and more.
