본문으로 건너뛰기
Skillpedia
모바일 앱48k · #5129

macos-spm-app-packaging

하는 일

이 도구는 Xcode 없이 Swift로 Mac 앱을 만들도록 돕습니다. 파일을 정리하고, 코드를 빌드하고, 앱에 서명하고, 배포할 수 있도록 패키징합니다.

사용하는 경우

  • ✓Xcode를 쓰지 않고 Swift로 Mac 앱을 만들고 싶을 때.
  • ✓앱을 패키징하고 서명하거나 배포 준비를 해야 할 때.
  • ✓앱의 빌드와 실행 과정을 자동화하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/macos-spm-app-packaging/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/macos-spm-app-packaging/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“SwiftPM을 사용해 ‘MyCoolApp’이라는 Mac 앱을 만들고, 패키징하는 방법을 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 먼저 프로젝트의 기본 구조를 설정합니다. 그다음 스크립트를 사용해 코드를 컴파일하고, 앱 번들을 만들고, 디지털로 서명하고, 공유할 준비를 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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.

When to Use

  • When the user needs a SwiftPM-based macOS app without relying on an Xcode project.
  • When you need packaging, signing, notarization, or appcast guidance for a SwiftPM app.

Two-Step Workflow

  1. 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.
  2. 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):

# Inspect signature and entitlements
codesign -dv --verbose=4 build/HelloApp.app

# Verify the bundle passes Gatekeeper checks locally
spctl --assess --type execute --verbose build/HelloApp.app

After notarization and stapling:

# Confirm the staple ticket is attached
stapler validate build/HelloApp.app

# Re-run Gatekeeper to confirm notarization is recognised
spctl --assess --type execute --verbose build/HelloApp.app

Common Notarization Failures

Symptom Likely Cause Recovery
The software asset has already been uploaded Duplicate submission for same version Bump BUILD_NUMBER in version.env and repackage.
Package Invalid: Invalid Code Signing Entitlements Entitlements in .entitlements file don't match provisioning Audit entitlements against Apple's allowed set; remove unsupported keys.
The executable does not have the hardened runtime enabled Missing --options runtime flag in codesign invocation Edit sign-and-notarize.sh to add --options runtime to all codesign calls.
Notarization hangs / no status email xcrun notarytool network or credential issue Run xcrun notarytool history to check status; re-export App Store Connect API key if expired.
stapler validate fails after successful notarization Ticket not yet propagated Wait ~60 s, then re-run xcrun stapler staple.

Templates

  • assets/templates/package_app.sh: Build binaries, create the .app bundle, copy resources, sign.
  • assets/templates/compile_and_run.sh: Dev loop to kill running app, package, launch.
  • assets/templates/build_icon.sh: Generate .icns from an Icon Composer file (requires Xcode install).
  • assets/templates/sign-and-notarize.sh: Notarize, staple, and zip a release build.
  • assets/templates/make_appcast.sh: Generate Sparkle appcast entries for updates.
  • assets/templates/setup_dev_signing.sh: Create a stable dev code-signing identity.
  • assets/templates/launch.sh: Simple launcher for a packaged .app.
  • assets/templates/version.env: Example version file consumed by packaging scripts.
  • assets/templates/bootstrap/: Minimal SwiftPM macOS app skeleton (Package.swift, Sources/, version.env).

Notes

  • Keep entitlements and signing configuration explicit; edit the template scripts instead of reimplementing.

…

자주 묻는 질문

SwiftPM이란 무엇인가요?

의존성을 관리하고 Swift 프로젝트를 빌드하는 도구입니다. Xcode 같은 복잡한 프로젝트 파일 없이도 코드를 정리할 수 있습니다.

앱을 ‘서명’한다는 것은 무슨 뜻인가요?

앱에 진위 도장을 찍는 것과 같습니다. 개발자가 만든 뒤 앱이 변조되지 않았음을 보장하고, macOS가 앱을 신뢰하도록 돕습니다.

‘공증(notarization)’이란 무엇인가요?

Apple이 앱에 악성코드가 없는지 검사하는 과정입니다. App Store 밖에서 앱을 배포할 때 중요한 단계입니다.

상세 정보

작성자의 원본 설명

Scaffold, build, sign, and package SwiftPM macOS apps without Xcode projects.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5129
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬