swiftpm-app-bundle

Solid

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".

Web & Frontend 0 stars 0 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
0
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 ...

Details

Author
chsistrying
Repository
chsistrying/swift-ship-skills
Created
6 days ago
Last Updated
5 days ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category