Synthèse automatique
Automatise l'archivage, l'export Developer ID et la soumission à la notarisation Apple d'une app macOS via xcodebuild et la CLI asc.
Points forts
- Couvre le pipeline complet : archive, export Developer ID, ZIP via ditto, soumission, suivi du statut et récupération du log en cas d'échec
- Inclut un pré-vol utile sur l'identité de signature et le diagnostic des erreurs de trust settings du trousseau (« Invalid trust settings », errSecInternalComponent)
- Donne les commandes exactes de vérification (chaîne d'autorités, horodatage) et les variantes fire-and-forget / --wait / polling personnalisé
- Précise les prérequis réels : Xcode, authentification asc, certificat Developer ID Application présent dans le trousseau
Limites
- Suppose que l'outil asc est installé et authentifié, ainsi qu'un compte Apple Developer et un certificat Developer ID déjà créés
- Les chemins, noms de schéma et TEAM_ID sont des placeholders à adapter manuellement
- Ne couvre pas les cas particuliers comme les apps sandboxées avec extensions, les app bundles imbriqués ou les installeurs .pkg
Quand vous devez distribuer une app macOS hors du Mac App Store et préparer une archive signée Developer ID puis notarisée par Apple.
Si vous publiez sur le Mac App Store, ou si vous cherchez un pipeline CI complet de release plutôt qu'une procédure de notarisation locale.
Analyse de sécurité
PrudenceThe skill is a legitimate Apple code-signing/notarization workflow. It runs privileged-but-standard developer tooling (xcodebuild, codesign, ditto, hdiutil, stapler, the `asc` CLI) and network calls only to Apple endpoints or a notarization log URL. There is no credential exfiltration, no curl|sh, and no obfuscation, but it does alter keychain trust settings and force-resign bundles, so it warrants a caution rating rather than safe.
- •`security remove-trusted-cert` modifies the user's keychain trust settings system-wide and is presented as a routine fix; a mistake here can break code signing for other apps on the machine.
- •`codesign --deep --force` is applied to an arbitrary app path in the verification step, which re-signs/overwrites signatures rather than just verifying them.
- •Instructions trust external log URLs and pipe the response into `curl -sL` and `python3 -m json.tool`; benign but involves network fetch of a user-supplied URL.
- •Relies on `asc` CLI and `ASC_*` environment variables (auth credentials) without describing their scope or how to protect them.
Exemples
Notarize my macOS app « Foobar » for distribution outside the App Store: archive it with xcodebuild, export with Developer ID, create the ZIP, and submit it with asc notarization, waiting for the result.xcodebuild export fails with « Invalid trust settings » / errSecInternalComponent for my Developer ID Application certificate. Check the trust settings and certificate chain and fix it before re-exporting.My notarization submission failed. Run asc notarization list to find the latest submission, fetch its developer log, and tell me what needs to change.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 loginorASC_*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:
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).
Fix Broken Trust Settings
If codesign or xcodebuild fails with "Invalid trust settings" or "errSecInternalComponent", the certificate may have custom trust overrides that break the chain:
# Check for custom trust settings
security dump-trust-settings 2>&1 | grep -A1 "Developer ID"
# If overrides exist, export the cert and remove them
security find-certificate -c "Developer ID Application" -p ~/Library/Keychains/login.keychain-db > /tmp/devid-cert.pem
security remove-trusted-cert /tmp/devid-cert.pem
Verify Certificate Chain
After fixing trust settings, verify the chain is intact:
codesign --deep --force --options runtime --sign "Developer ID Application: YOUR NAME (TEAM_ID)" /path/to/any.app 2>&1
The signing must show the chain: Developer ID Application → Developer ID Certification Authority → Apple Root CA.
Step 1: Archive
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 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:
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
codesign -dvvv "/tmp/YourAppExport/YourApp.app" 2>&1 | grep -E "Authority|Timestamp"
Confirm:
- Authority chain starts with "Developer ID Application"
- A Timestamp is present
Step 3: Create a ZIP for Notarization
ditto -c -k --keepParent "/tmp/YourAppExport/YourApp.app" "/tmp/YourAppExport/YourApp.zip"
Step 4: Submit for Notarization
Fire-and-forget
asc notarization submit --file "/tmp/YourAppExport/YourApp.zip"
Wait for result
asc notarization submit --file "/tmp/YourAppExport/YourApp.zip" --wait
Custom polling
asc notarization submit --file "/tmp/YourAppExport/YourApp.zip" --wait --poll-interval 30s --timeout 1h
Step 5: Check Results
Status
asc notarization status --id "SUBMISSION_ID" --output table
Developer Log (for failures)
asc notarization log --id "SUBMISSION_ID"
Fetch the log URL to see detailed issues:
curl -sL "LOG_URL" | python3 -m json.tool
List Previous Submissions
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:
xcrun stapler staple "/tmp/YourAppExport/YourApp.app"
For DMG or PKG distribution, staple after creating the container:
# 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:
productsign --sign "Developer ID Installer: YOUR NAME (TEAM_ID)" unsigned.pkg signed.pkg
Then submit:
asc notarization submit --file signed.pkg --wait
Troubleshooting
"Invalid trust settings" during export
The Developer ID certificate has custom trust overrides. See the Preflight section above to remove them.
"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:
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:
asc notarization log --id "SUBMISSION_ID"
Common causes: unsigned nested binaries, missing hardened runtime, embedded libraries without timestamps.
Notes
- The
asc notarizationcommands use the Apple Notary API v2, notxcrun notarytool. - Authentication uses the same API key as other
asccommands. - 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
--helpto verify flags:asc notarization submit --help.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/macos-notarization-ms47vqju/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/macos-notarization-ms47vqju' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/macos-notarization-ms47vqju/download' --output '.skill-downloads/macos-notarization-ms47vqju/SKILL.md.part' && mv '.skill-downloads/macos-notarization-ms47vqju/SKILL.md.part' '.skill-downloads/macos-notarization-ms47vqju/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/macos-notarization-ms47vqju/SKILL.md' && test -s '.skill-downloads/macos-notarization-ms47vqju/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/asc-notarization' && cp -R '.skill-downloads/macos-notarization-ms47vqju' '.claude/skills/asc-notarization'Cursor
test -f '.skill-downloads/macos-notarization-ms47vqju/SKILL.md' && test -s '.skill-downloads/macos-notarization-ms47vqju/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/asc-notarization' && cp -R '.skill-downloads/macos-notarization-ms47vqju' '.cursor/skills/asc-notarization'Codex
test -f '.skill-downloads/macos-notarization-ms47vqju/SKILL.md' && test -s '.skill-downloads/macos-notarization-ms47vqju/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/asc-notarization' && cp -R '.skill-downloads/macos-notarization-ms47vqju' '.agents/skills/asc-notarization'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/macos-notarization-ms47vqju'openskills read 'macos-notarization-ms47vqju'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/macos-notarization-ms47vqju/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Configurer un canal de discussion avec SecretRefs
DevOps
Configurez des canaux de discussion avec des commandes non interactives, les secrets étant uniquement des SecretRefs. Couvre les étapes de collecte, modification, réparation et vérification.
Enquêter sur les échecs CI de ClickHouse
DevOps
Investigue un échec CI de ClickHouse de bout en bout à partir d'une URL de PR ou de rapport S3. Récupère les tests échoués, classe flaky vs vraie régression, et cherche des issues/fixes existants.
Revue de PR Ansible
DevOps
Examine une PR Ansible selon le processus standardisé du projet, incluant la validation des changelogs, la couverture de tests et le suivi des commentaires.