swiftpm-app-bundlelisted
Install: claude install-skill chsistrying/swift-ship-skills
# SwiftPM App Bundle
## Overview
Turns a SwiftPM `.executableTarget` into a real macOS `.app` bundle plus an
unsigned `.dmg`, with no Xcode project involved. This is the common path for
small AppKit/SwiftUI utilities (menu bar apps, single-window tools) that are
built with `swift build` and never had an `.xcodeproj` to begin with.
## Prerequisites
- macOS 12+ with Xcode Command Line Tools (`swift`, `codesign`, `xcrun`).
- `hdiutil` (bundled with macOS) for DMG creation.
- A `Package.swift` with at least one `.executable` product.
## When to use this skill
- The repo has a `Package.swift` with an `.executable` product but no `.app`
bundle, no `.xcodeproj`/`.xcworkspace`, and the user wants something they
(or testers) can double-click, or a `.dmg` to hand out.
- The user mentions: "package .app", "make a DMG", "SwiftPM executable to app
bundle", "menu bar app distribution", "ship this as a Mac app".
## What it does NOT do
- Does not sign or notarize anything (see `references/signing-notarization.md`
for that — it requires a paid Apple Developer account).
- Does not create an Xcode project. If the user actually wants a proper
Xcode-managed app target, that's a different task — ask before assuming.
## Usage
From the repo root (the directory containing `Package.swift`):
```bash
scripts/package_app.sh
```
With no flags it will:
1. Auto-detect the app name from the first `.executable(name: "...")` product
in `Package.swift`.
2. `swift build -c release` that