MacOS sample written in Swift