Skip to main content
skill CX Codex

asc-notarization — Claude Code skill: install and use

Prepares a macOS app for distribution outside the App Store by archiving, Developer ID export, and Apple notarization.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -a claude-code
Open on GitHub

What asc-notarization does

This skill guides xcodebuild archiving, developer-id export, signature checks, and ZIP packaging for a signed .app bundle. It then submits the file with asc notarization, checks its status, and retrieves failure logs.

You need Xcode with command line tools configured, asc authentication, and a Developer ID Application certificate in the local keychain. Check the signing identity first, because export and notarization stop without the expected certificate.

After acceptance, the skill can staple a ticket with xcrun stapler staple for offline use. Staple a .dmg after creating the disk image; a .pkg requires a separate Developer ID Installer certificate.

What it helps with

  • archive a macOS app with xcodebuild
  • export a build using Developer ID signing
  • verify an app signature and nested code
  • submit a ZIP for Apple notarization
  • inspect a notarization failure log

Example prompts for the agent

  • “Archive my macOS app and export it with Developer ID signing.”
  • “Verify /tmp/YourAppExport/YourApp.app before submission.”
  • “Submit /tmp/YourAppExport/YourApp.zip for notarization and wait for the result.”

How to install asc-notarization

1Skills CLI (Vercel)

npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -a claude-code

2Manually: put the files in place

~/.claude/skills/asc-notarization/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/asc-notarization/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about asc-notarization

How do I install asc-notarization in Claude Code?

Run npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -a claude-code, then run npx skills add rorkai/app-store-connect-cli-skills --skill asc-notarization -a claude-code again. The skill is placed at ~/.claude/skills/asc-notarization/SKILL.md.

What does asc-notarization do?

It covers archiving and exporting a macOS app, validating its Developer ID signature, submitting it through asc, and checking notarization results.

What certificate is needed for a .pkg?

A .pkg needs a Developer ID Installer certificate, separate from Developer ID Application. Sign the package with productsign before submitting it with asc notarization submit.

Source text

SKILL.md · MIT
---
name: asc-notarization
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.
---

# 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>
```

Export the archive:

```bash
xcodebuild -exportArchive \
  -archivePath /tmp/YourApp.xcarchive \
  -exportPath /tmp/YourAppExport \
  -exportOptionsPlist ExportOptions.plist
```

This produces a `.app` bundle signed with Developer ID Application and a secure timestamp.

### Verify the Export

Verify the exported app's existing signature and nested code, then display its signing details:

```bash
codesign --verify --deep --strict --verbose=2 "/tmp/YourAppExport/YourApp.app" && \
  codesign --display --verbose=4 "/tmp/YourAppExport/YourApp.app" 2>&1
```

Confirm:
- The verification command exits successfully; displaying signing details alone does not validate the signature
- The Authority chain is Developer ID Application → Developer ID Certification Authority → Apple Root CA, with the expected TeamIdentifier
- A Timestamp is present

Stop before packaging or uploading if verification fails or the signing identity is unexpected. Diagnose the failure and rebuild or re-export the intended app before checking again. These checks do not modify the bundle and do not establish notarization acceptance.

Do not add `--sign` or `--force` to verification. [Apple's code-signing guidance](https://developer.apple.com/library/archive/technotes/tn2206/) distinguishes recursive verification with `--deep` from signing with `--deep --force`, which forcibly re-signs nested code.

## Step 3: Create a ZIP for Notarization

```bash
ditto -c -k --keepParent "/tmp/YourAppExport/YourApp.app" "/tmp/YourAppExport/YourApp.zip"
```

## Step 4: Submit for Notarization

### Fire-and-forget
```bash
asc notarization submit --file "/tmp/YourAppExport/YourApp.zip"
```

### Wait for result
```bash
asc notarization submit --file "/tmp/YourAppExport/YourApp.zip" --wait
```

### Custom polling
```bash
asc notarization submit --file "/tmp/YourAppExport/YourApp.zip" --wait --poll-interval 30s --timeout 1h
```

## Step 5: Check Results

### Status
```bash
asc notarization status --id "SUBMISSION_ID" --output table
```

### Developer Log (for failures)
```bash
asc notarization log --id "SUBMISSION_ID"
```

Fetch the log URL to see detailed issues:
```bash
curl -sL "LOG_URL" | python3 -m json.tool
```

### List Previous Submissions
```bash
asc notarization list --output table
asc notarization list --limit 5 --output table
```

## Step 6: Staple (Optional)

After notarization succeeds, staple the ticket so the app works offline:

```bash
xcrun stapler staple "/tmp/YourAppExport/YourApp.app"
```

For DMG or PKG distribution, staple after creating the container:
```bash
# Create DMG
hdiutil create -volname "YourApp" -srcfolder "/tmp/YourAppExport/YourApp.app" -ov -format UDZO "/tmp/YourApp.dmg"
xcrun stapler staple "/tmp/YourApp.dmg"
```

## Supported File Formats

| Format | Use Case |
|--------|----------|
| `.zip`  | Simplest; zip a signed `.app` bundle |
| `.dmg`  | Disk image for drag-and-drop install |
| `.pkg`  | Installer package (requires Developer ID Installer certificate) |

## PKG Notarization

To notarize `.pkg` files, you need a **Developer ID Installer** certificate (separate from Developer ID Application). This certificate type is not available through the App Store Connect API — create it at https://developer.apple.com/account/resources/certificates/add.

Sign the package:
```bash
productsign --sign "Developer ID Installer: YOUR NAME (TEAM_ID)" unsigned.pkg signed.pkg
```

Then submit:
```bash
asc notarization submit --file signed.pkg --wait
```

## Troubleshooting

### "Invalid trust settings" during export
Custom trust overrides are one possible cause. Use the read-only inspection in Preflight, identify the affected certificate, and obtain authorization before changing its trust settings.

### "The binary is not signed with a valid Developer ID certificate"
The app was signed with a Development or App Store certificate. Re-export with `method: developer-id` in ExportOptions.plist.

### "The signature does not include a secure timestamp"
Add `--timestamp` to manual `codesign` calls, or use `xcodebuild -exportArchive` which adds timestamps automatically.

### Upload timeout for large files
Set a longer upload timeout:
```bash
ASC_UPLOAD_TIMEOUT=5m asc notarization submit --file ./LargeApp.zip --wait
```

### Notarization returns "Invalid" but signing looks correct
Fetch the developer log for specific issues:
```bash
asc notarization log --id "SUBMISSION_ID"
```

Common causes: unsigned nested binaries, missing hardened runtime, embedded libraries without timestamps.

## Notes
- The `asc notarization` commands use the Apple Notary API v2, not `xcrun notarytool`.
- Authentication uses the same API key as other `asc` commands.
- Files are uploaded directly to Apple's S3 bucket with streaming (no full-file buffering).
- Files over 5 GB use multipart upload automatically.
- Always use `--help` to verify flags: `asc notarization submit --help`.

© rorkai · MIT · rorkai/app-store-connect-cli-skills

Similar skills

Everything for Mobile →

From the same set24

asc-shots-pipeline Automates iOS builds, simulator screenshots, framing, and uploads through asc. Use it when screenshot capture needs a repeatable plan-driven flow. CX Codex +1 6,900installs asc-localize-metadata Downloads App Store descriptions, keywords, what's new and subtitles, translates them via LLM, and syncs the results back to App Store Connect. CX Codex +1 7,000installs asc-subscription-localization Bulk-updates display names and descriptions for App Store subscriptions, groups, and in-app purchases using asc. Saves developers from clicking through dozens of languages in the web UI. CX Codex +1 6,800installs asc-workflow Turns App Store Connect chores into a repo-local .asc/workflow.json the agent can validate, dry-run and resume after a failed step. CX Codex +1 6,700installs asc-crash-triage Triages TestFlight crashes, beta feedback, and build performance metrics using the asc CLI to produce actionable iOS reports. CX Codex +1 6,400installs asc-aso-audit Runs an offline ASO audit on local App Store metadata in ./metadata, flagging wasted keyword space, bad separators, and missing fields. CX Codex +1 6,200installs asc-revenuecat-catalog-sync Reconciles App Store Connect subscriptions and in-app purchases with RevenueCat catalog resources. Use it before release or when the two catalogs have drifted apart. CX Codex +1 6,100installs asc-wall-submit Files or updates your app's Wall of Apps entry in the App-Store-Connect-CLI repo: a dry run first, then a confirmed submit with a PR plan. CX Codex +1 5,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor