← ClaudeAtlas

swiftpm-app-bundlelisted

Package a Swift Package Manager (SwiftPM) executable target — an AppKit or SwiftUI app built without an Xcode project — into a distributable macOS .app bundle and an unsigned .dmg. Use when the user wants to package .app, build a DMG, turn a SwiftPM executable to app bundle, prepare a menu bar app distribution, ship a Swift command-line/GUI target as a double-clickable Mac app, or asks about Info.plist / .icns / LSUIElement / codesign / notarization for a package-based (no .xcodeproj) macOS app. Trigger with "/swiftpm-app-bundle".
chsistrying/swift-ship-skills · ★ 0 · Web & Frontend · score 76
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