- français
- English
Notarization
Notarization Workflow
Customizing the Notarization Workflow Resolving Common Notarization Issues
Using app-specific passwords (i.e. |
Suite de commandes requises pour notariser le AppleScript/Shell
1️⃣ Suppression de la signature existante (issue de Script Editor)
% codesign --remove-signature SecurePrintStudent1
.app
ou bien suppression des attributs refusés par codesign
% xattr -cr SecurePrintStudent1.app
2️⃣ Signature manuelle de l'applet AppleScript
(avec ajout de l'option runtime pour éviter l'erreur «The executable does not have the hardened runtime enabled» lors de la notarisation)
% codesign --entitlements entitlements.plist --options runtime --timestamp --sign J8A6UP2TFJ SecurePrintStudent1
.app
3️⃣ Compression de l'applet AppleScript pour soumission à Apple
% /usr/bin/ditto -c -k --keepParent SecurePrintStudent1
.app SecurePrintStudent1
.zip
4️⃣ Activer Xcode en ligne de commande
💡à n'effectuer que la première fois
% sudo xcode-select -s /Application/Xcode13.app
Mémorisation d'un mot de passe d'application (Using app-specific passwords)
💡à n'effectuer que la première fois
% xcrun notarytool store-credentials --apple-id "apple-ios@epfl.ch" --team-id "J8A6UP2TFJ"
5️⃣ Soumission de l'applet AppleScript à Apple pour sa notarisation
% xcrun notarytool submit SecurePrintStudent1
.zip --keychain-profile Notaire --wait
Conducting pre-submission checks for SecurePrintStudent1
.zip and initiating connection to the Apple notary service...
Submission ID received
id: 9664b7ad-75b2-4cea-a3a1-ccff14f2a8d7
Successfully uploaded file
id:
9664b7ad-75b2-4cea-a3a1-ccff14f2a8d7
path: /Users/froulet/Downloads/SecurePrintStudent1
.zip
Waiting for processing to complete.
Current status: Accepted........
Processing complete
id:
9664b7ad-75b2-4cea-a3a1-ccff14f2a8d7
status: Accepted
6️⃣ Agrafage du certificat notarié sur l'applet AppleScript
(afin d'être indépendant de connexion Internet lors de l'exécution de l'applet)
% xcrun stapler staple SecurePrintStudent1
.app
Processing: /Users/froulet/Downloads/
SecurePrintStudent1
.app
Processing: /Users/froulet/Downloads/SecurePrintStudent1
.app
The staple and validate action worked!
Fichier de déclaration: entitlements.plist
<?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>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
ℹ️ Un avertissement de GateKeeper, mais aucun blocage 😇
(Affichage sur macOS 12 "Monterey")
08.02.2022