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 |
assets/templates/sign-and-notarize.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
APP_NAME=${APP_NAME:-MyApp}
APP_IDENTITY=${APP_IDENTITY:-"Developer ID Application: Example (TEAMID)"}
APP_BUNDLE="${APP_NAME}.app"
ROOT=$(cd "$(dirname "$0")/.." && pwd)
source "$ROOT/version.env"
ZIP_NAME="${APP_NAME}-${MARKETING_VERSION}.zip"
if [[ -z "${APP_STORE_CONNECT_API_KEY_P8:-}" || -z "${APP_STORE_CONNECT_KEY_ID:-}" || -z "${APP_STORE_CONNECT_ISSUER_ID:-}" ]]; then
echo "Missing APP_STORE_CONNECT_* env vars (API key, key id, issuer id)." >&2
exit 1
fi
echo "$APP_STORE_CONNECT_API_KEY_P8" | sed 's/\\n/\n/g' > /tmp/app-store-connect-key.p8
trap 'rm -f /tmp/app-store-connect-key.p8 /tmp/${APP_NAME}Notarize.zip' EXIT
ARCHES_VALUE=${ARCHES:-"arm64 x86_64"}
ARCH_LIST=( ${ARCHES_VALUE} )
for ARCH in "${ARCH_LIST[@]}"; do
swift build -c release --arch "$ARCH"
done
ARCHES="${ARCHES_VALUE}" "$ROOT/Scripts/package_app.sh" release
ENTITLEMENTS_DIR="$ROOT/.build/entitlements"
APP_ENTITLEMENTS="${APP_ENTITLEMENTS:-${ENTITLEMENTS_DIR}/${APP_NAME}.entitlements}"
codesign --force --timestamp --options runtime --sign "$APP_IDENTITY" \
--entitlements "$APP_ENTITLEMENTS" \
"$APP_BUNDLE"
DITTO_BIN=${DITTO_BIN:-/usr/bin/ditto}
"$DITTO_BIN" --norsrc -c -k --keepParent "$APP_BUNDLE" "/tmp/${APP_NAME}Notarize.zip"
xcrun notarytool submit "/tmp/${APP_NAME}Notarize.zip" \
--key /tmp/app-store-connect-key.p8 \
--key-id "$APP_STORE_CONNECT_KEY_ID" \
--issuer "$APP_STORE_CONNECT_ISSUER_ID" \
--wait
xcrun stapler staple "$APP_BUNDLE"
xattr -cr "$APP_BUNDLE"
find "$APP_BUNDLE" -name '._*' -delete
"$DITTO_BIN" --norsrc -c -k --keepParent "$APP_BUNDLE" "$ZIP_NAME"
spctl -a -t exec -vv "$APP_BUNDLE"
stapler validate "$APP_BUNDLE"
echo "Done: $ZIP_NAME"
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: 196k | 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: 196k | 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: 196k | Updated | Claude CodeCodex | Verified | Install |