# Asc Notarization

Archive, export, and notarize macOS apps using xcodebuild and asc.

- Repository: https://github.com/rorkai/app-store-connect-cli-skills (1119 stars)
- Category: Mobile
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -g -a claude-code -y`
Codex: `npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -g -a codex -y`
Cursor: `npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -g -a cursor -y`
Gemini CLI: `npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add rorkai/app-store-connect-cli-skills`

## Description

Archive, export, and notarize macOS apps using xcodebuild and asc. Use when you need to prepare a macOS app for distribution outside the App Store with Developer ID signing and Apple notarization.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# macOS Notarization

Use this skill when you need to notarize a macOS app for distribution outside the App Store.

## Preconditions
- Xcode installed and command line tools configured.
- Auth is configured (`asc auth login` or `ASC_*` env vars).
- A Developer ID Application certificate in the local keychain.
- The app's Xcode project builds for macOS.

## Preflight: Verify Signing Identity

Before archiving, confirm a valid Developer ID Application identity exists:

```bash
security find-identity -v -p codesigning | grep "Developer ID Application"
```

If no identity is found, create one at https://developer.apple.com/account/resources/certificates/add (the App Store Connect API does not support creating Developer ID certificates).

### Inspect Trust Settings

If `codesign` or `xcodebuild` fails with "Invalid trust settings" or "errSecInternalComponent", the certificate may have custom trust overrides that break the chain:

```bash
# Check for custom trust settings
security dump-trust-settings 2>&1 | grep -A1 "Developer ID"
```

These errors do not by themselves prove a trust override is the cause. Inspect the affected certificate before proposing a repair. Changing trust settings requires explicit authorization for that certificate; do not remove trust overrides or re-sign an arbitrary app as a diagnostic step.

## Step 1: Archive

```bash
xcodebuild archive \
  -scheme "YourMacScheme" \
  -configuration Release \
  -archivePath /tmp/YourApp.xcarchive \
  -destination "generic/platform=macOS"
```

## Step 2: Export with Developer ID

Create an ExportOptions plist for Developer ID distribution:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>developer-id</string>
    <key>signingStyle</key>
    <string>automatic</string>
    <key>teamID</key>
    <string>YOUR_TEAM_ID</string>
</dict>
</plist>
```

The rest: https://github.com/rorkai/app-store-connect-cli-skills/blob/HEAD/skills/asc-notarization/SKILL.md
