JordanCoin/ios-skills-collection / skills/dimillian--macos-spm-app-packaging
macos-spm-app-packaging
FlaggedScaffold, 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.7 KB |
| assets/templates/bootstrap/Package.swift | script | 334 B |
| assets/templates/bootstrap/Sources/MyApp/Resources/.keep | other | 0 B |
| assets/templates/bootstrap/Sources/MyApp/main.swift | script | 173 B |
| assets/templates/bootstrap/version.env | config | 39 B |
| assets/templates/build_icon.sh | script | 1.5 KB |
| assets/templates/compile_and_run.sh | script | 1.8 KB |
| assets/templates/launch.sh | script | 767 B |
| assets/templates/make_appcast.sh | script | 2.1 KB |
| assets/templates/package_app.sh | script | 6.0 KB |
| assets/templates/setup_dev_signing.sh | script | 1.3 KB |
| assets/templates/sign-and-notarize.sh | script | 1.7 KB |
| assets/templates/version.env | config | 39 B |
| references/packaging.md | markdown | 783 B |
| references/release.md | markdown | 1.2 KB |
| references/scaffold.md | markdown | 1.6 KB |
references/scaffold.md
View on GitHub# Scaffold a SwiftPM macOS app (no Xcode)
## Steps
1) Create a repo and initialize SwiftPM:
```
mkdir MyApp
cd MyApp
swift package init --type executable
```
2) Update `Package.swift` to target macOS and define an executable target for the app.
3) Create the app entry point under `Sources/MyApp/`.
- Use SwiftUI if you want a windowed app with minimal AppKit glue.
- Use AppKit if you want a menu bar or accessory-style app.
4) If you need app resources, add:
```
resources: [.process("Resources")]
```
and create `Sources/MyApp/Resources/`.
5) Add a `version.env` file (used by packaging templates):
```
MARKETING_VERSION=0.1.0
BUILD_NUMBER=1
```
6) Copy script templates from `assets/templates/` into your repo (for example, `Scripts/`).
## Minimal Package.swift (example)
```
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "MyApp",
platforms: [.macOS(.v14)],
targets: [
.executableTarget(
name: "MyApp",
path: "Sources/MyApp",
resources: [
.process("Resources")
])
]
)
```
## Minimal SwiftUI entry point (example)
```
import SwiftUI
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
Text("Hello")
}
}
}
```
## Minimal AppKit entry point (example)
```
import AppKit
final class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ notification: Notification) {
// Initialize app state here.
}
}
let app = NSApplication.shared
let delegate = AppDelegate()
app.delegate = delegate
app.setActivationPolicy(.regular)
app.run()
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |