Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project. Use when you need a from-scratch macOS app layout, SwiftPM targets/resources, a custom .app bundle assembly script, or signing/notarization/appcast steps outside Xcode.
Start a fresh conversation. Replace the highlighted placeholders.
Use macos-spm-app-packaging to scaffold and package a SwiftPM macOS app named [app name] with bundle ID [bundle ID]; run the documented build and test gates before providing the packaged app, without signing, notarizing, or publishing it.
Required inputs
[app name]
[bundle ID]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: macos-spm-app-packagingdescription: Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project. Use when you need a from-scratch macOS app layout, SwiftPM targets/resources, a custom .app bundle assembly script, or signing/notarization/appcast steps outside Xcode.
macOS SwiftPM App Packaging (No Xcode)
Overview
Bootstrap a complete SwiftPM macOS app folder, then build, package, and run it without Xcode. Use assets/templates/bootstrap/ for the starter layout and references/packaging.md + references/release.md for packaging and release details.
Two-Step Workflow
Bootstrap the project folder
Copy assets/templates/bootstrap/ into a new repo.
Rename MyApp in Package.swift, Sources/MyApp/, and version.env.
Customize APP_NAME, BUNDLE_ID, and versions.
Build, package, and run the bootstrapped app
Copy scripts from assets/templates/ into your repo (for example, Scripts/).
Build/tests: swift build and swift test.
Package: Scripts/package_app.sh.
Run: Scripts/compile_and_run.sh (preferred) or Scripts/launch.sh.
Release (optional): Scripts/sign-and-notarize.sh and Scripts/make_appcast.sh.
Tag + GitHub release (optional): create a git tag, upload the zip/appcast to the GitHub release, and publish.
Minimum End-to-End Example
Shortest path from bootstrap to a running app:
# 1. Copy and rename the skeleton
cp -R assets/templates/bootstrap/ ~/Projects/MyApp
cd ~/Projects/MyApp
sed -i '' 's/MyApp/HelloApp/g' Package.swift version.env
# 2. Copy scripts
cp assets/templates/package_app.sh Scripts/
cp assets/templates/compile_and_run.sh Scripts/
chmod +x Scripts/*.sh
# 3. Build and launch
swift build
Scripts/compile_and_run.sh
Validation Checkpoints
Run these after key steps to catch failures early before proceeding to the next stage.
After packaging (Scripts/package_app.sh):
# Confirm .app bundle structure is intact
ls -R build/HelloApp.app/Contents
# Check that the binary is present and executable
file build/HelloApp.app/Contents/MacOS/HelloApp
After signing (Scripts/sign-and-notarize.sh or ad-hoc dev signing):