← All use cases

Build for macOS

Use ZeroTwo to set up, build, and debug native Mac apps in SwiftUI.

ZeroTwo creates macOS SwiftUI apps, sets up a build-and-run loop driven from the shell, and adds desktop-native scenes, windows, AppKit, and signing steps as the app matures.

Advanced
1h

Skills & Plugins

  • Build macOS Apps
    Covers shell-first build loops, SwiftUI scenes, AppKit interop, signing, and notarization (desktop app; needs a Mac with Xcode).

Scaffold the app and build loop

Have ZeroTwo pick the scene model up front (WindowGroup, Window, Settings, MenuBarExtra, or DocumentGroup) so the app starts out desktop-native. Drive builds from the shell: xcodebuild for Xcode projects, or swift build with a script/build_and_run.sh that restarts the app. Bundle SwiftPM GUI apps as a .app before launching.

Leverage skills

The Build macOS Apps plugin covers shell-first loops, packaging and notarization, SwiftUI scenes, AppKit interop, logging, test triage, and signing. It runs from the ZeroTwo desktop app on a Mac with Xcode. See the plugins and skills docs.

Build desktop-native UI

Follow Mac conventions: NavigationSplitView, a Settings scene, toolbars and commands, menu bar extras. Start with system materials and standard controls, and bridge to AppKit only for gaps like open/save panels or first-responder control.

Debug, test, and prepare for shipping

Verify runtime behavior with a few Logger events and log stream. For failing tests, run the narrowest scope and classify the failure. For distribution, prepare Xcode and scripted archive and notarization paths, and inspect the bundle with codesign and plutil.

Example prompt

Ask for a native SwiftUI feature with a main window, settings, and commands, an optional tiny AppKit bridge, an updated script/build_and_run.sh, and a report of the commands used.

Practical tips

Keep scenes explicit

Make windows and menu bar extras separate scene roots.

Let system chrome do more of the work

Check standard APIs before custom chrome.

Treat AppKit as a narrow edge

Wrap one capability and keep SwiftUI owning state.

Validate signing and notarization separately from local build success

A local launch doesn't prove notarization readiness; check signing explicitly when shipping.

Related use cases