A highly-opinionated Xcode project template to build a new macOS app with.
I maintained it in Objective-C for over a decade before finally porting it to Swift in 2018. Anytime I start a new app – big or small, whether or not it’s something I plan on releasing publicly or if it’s just a small prototype or utility app I’m building for myself – I start with this project.
NSWindowController
s for a primary app window and Preferences window are wired up and ready to go. They’re also built using xib
s because storyboards on macOS are dumb.AppleScript
enabled by default and includes a sample .sdef
scripting dictionary because you can pry AppleScript
support out of my cold, dead hands.NSView
subclasses that I find myself using in nearly every project.agvtool
. Little things such as those that are helpful but nearly impossible to google unless you know what you don’t know.extension
s that always come up and no one wants to write from scratch each time.Podfile
and Cartfile
s that include the usual open source libraries I include in all of my projects. (I would have migrated to the Swift Package Manager instead, but not everything is available through it yet.)Clone this repo.
Inside you’ll find a small shell script called renameApp.sh
. This will let you rename the project to something other than DefaultApp
. To use it, just run this command in a command prompt:
./renameApp.sh MyAppName
If all goes well, everything will be renamed properly. Note: I haven’t tested that command using a name with spaces, so YMMV.
I’d love to hear your feedback - good or bad. And pull requests and bug reports are always appreciated.
However, I make no apologies for the fact that the choices made in this project are highly opinionated based on my 13 years as an independent developer working primarily on my own software. So, like the accompanying blog post says…
don’t use this as the basis for a billion dollar corporation’s enterprise app. Or with a team of “100 engineers” “solving hard problems”. But if you’re a one-person development shop or a team of just two or three engineers building a typical macOS shoebox or document based app? Please take a look.