Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sabarnett/mactemplateapp

A template for Mac desktop apps
https://github.com/sabarnett/mactemplateapp

macos swiftui template

Last synced: 24 days ago
JSON representation

A template for Mac desktop apps

Awesome Lists containing this project

README

        

# Mac Template

I'm a bit new to writing Mac applications with SwiftUI. I've written a few iOS apps (entirely for my
own amusement) but my exposure to Mac development is minimal. As an ex-Windows developer
it's a natural progression to do Mac development, so I need to pull together some of the basic
concepts.

The best way to document this stuff is to create a template for a Mac application that includes all of
the basics like window layout, dialogs, menus and a few other things.

That's what this project is. It's a template that I am developing along side the creation of some
documentation on Mac development with SwiftUI.

## Documentation

The documentation is in a Scrivener file, which I have not included here. It's a work in progress
and a long way from public release. However, in the Docs folder, you will find the latest PDF version
of the file. Until I get all the basic elements sorted out I'm not intending to do a proper review of the
content, so it's a little rough and the language isn't necessarily what you would expect of a
professional publication. But, then, this isn't a professional publication and I have no intention of
publishing it, so that's all good.

## Updates

I intend to update this on a regular basis. The document may lag behind the code just because it's easier
to push the code than it is to re-generate the document. Sorry about that.

### Feb 2024
I have extended the Notifications section to simplify the code and to remove the boilerplate
that we added to define the notification handler and the cleanup code. This has been replaced with the onReceive
modifier, forcing the SwiftUI engine to do the heavy lifting for us. I have also extended the Notifications struct
to provide computed properties that simplify the code in the view greatly.