Sign in Join
Wiki copytemporary

Notarization for macOS 10.14.5+: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Overview
22
33Beginning with macOS 10.14.5 (Mojave), software signed with a new Apple developer certificate and all new or updated kernel extensions must be notarized to run. Beginning in macOS 10.15 (Catalina), all software built after June 1, 2019, and code signed with an Apple developer certificate must be notarized. *Notarization is not required for software distributed through the Apple App Store* because the App Store submission process already includes equivalent security checks.
44
55In November 2023, Apple amended the Notarizing process and rules, and changed the utility program to notarytool. These changes are now shown below.
66
77Notarization is designed by Apple to give users more confidence that Apple developer-signed software has been checked by Apple for malicious components. Notarization is not an App Review. The Apple notary service is an automated system that scans software for malicious content, checks for code-signing issues, and returns the results. If there are no issues, the notary service generates a ticket to staple to the software; the notary service also publishes that ticket online where Gatekeeper can find it.
88
99When the user first installs or runs software, the presence of a ticket (either online or attached to the executable) tells Gatekeeper that Apple notarized the software. Gatekeeper then places descriptive information in the initial launch dialog to help the user make an informed choice about whether to launch the app.
1010
1111> **Note:** **Even if an application has not been notarized, it can still be run by control-clicking on the app, or right clicking for the context menu, and choosing *Open* - see the Gatekeeper "bypass" dialog in the gallery [[Notarization for macOS 10.14.5+|below]].**
1212
1313Code signing an application without also notarizing it is now a totally pointless exercise *unless* you are only distributing your application via the App Store.
1414
1515## Gatekeeper dialogs
1616
1717![](/wiki-images/2/29/Macos-mojave-app-downloaded-from-internet-alert-dark.jpg)
1818
1919Gatekeeper Dialog before Catalina where an app that is not notarized is first opened (Mojave macOS 10.14 dialog)
2020
2121![](/wiki-images/c/c6/Screenshot_2020-01-02_at_22.42.01.png)
2222
2323Gatekeeper dialog where an app which is signed and notarized is first opened (Catalina macOS 10.15.1 dialog)
2424
2525![](/wiki-images/4/4a/Gatekeep_no.png)
2626
2727Gatekeeper dialog where an app is not signed nor notarized is first opened (Catalina macOS 10.15.1 dialog)
2828
2929![](/wiki-images/2/21/Macos-catalina-alert-unsigned-override.jpg)
3030
3131The Gatekeeper "bypass" dialog, accessed by control-clicking on the app (Catalina macOS 10.15.3 dialog)
3232
3333## Notarization requirements
3434
3535Notarization requires the Xcode command line tools from Xcode 10 or later. Building a new app for notarization requires macOS 10.13.6 or later. Stapling an app requires macOS 10.12 or later.
3636
3737Apple's notary service requires you to:
3838
3939- Enable code-signing for all of the executables you distribute.
4040- Enable the [[Hardened runtime for macOS|Hardened Runtime]] capability for your application and command line targets.
4141- Use a “Developer ID” application, kernel extension, or installer certificate for your code-signing signature.
4242- Include a secure timestamp with your code-signing signature (include the --timestamp option when running the codesign tool).
4343- Don’t include the com.apple.security.get-task-allow entitlement with the value set to any variation of true. If your software hosts third-party plug-ins and needs this entitlement to debug the plug-in in the context of a host executable, see [Avoid the Get-Task-Allow Entitlement](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087731).
4444- Link against the macOS 10.9 or later SDK.
4545
4646On 3 September 2019 Apple announced that until January 2020 developers could get new versions of applications notarized even though they were not [[Hardened runtime for macOS|hardened]] or fully compliant with the normal requirements. **That deadline was later extended to 3 February 2020. The above notarization requirements are now in full effect.**
4747
4848### Apple Statement 23 December 2019
4949
5050In June, we announced that all Mac software distributed outside the Mac App Store must be notarized by Apple in order to run by default on macOS Catalina. In September, we temporarily adjusted the notarization prerequisites to make this transition easier and to protect users on macOS Catalina who continue to use older versions of software. Starting February 3, 2020, all submitted software must meet the original notarization prerequisites.
5151
5252If you haven’t yet done so, upload your software to the notary service and review the developer log for warnings. These warnings will become errors starting February 3 and must be fixed in order to have your software notarized. Software notarized before February 3 will continue to run by default on macOS Catalina.
5353
5454As a reminder, all installer packages must be signed since they may contain executable code. Disk images do not need to be signed, although signing them can help your users verify their contents.
5555
5656## Notarizing an application
5757
5858These instructions assume you have completed the other preparatory steps: [[Code Signing for macOS|code signed]] the application, implemented the [[Hardened runtime for macOS|hardened runtime capability]], [[Code Signing for macOS|code signed]] the installer pkg (if you have one) etc.
5959
6060You can't upload the .app bundle directly to the notary service, you need to create a compressed archive containing the application or you can put applications, kernel extensions, and other software in a container, like a disk image, and notarize the container. The notary service accepts disk images (UDIF format), signed flat installer packages, and ZIP archives. It processes nested containers as well, like packages inside a disk image.
6161
6262### Step 1 - Create disk image
6363
6464Create a disk image by opening a Terminal and running the following command:
6565
6666``` bash
6767hdiutil create -volname MyApp -srcfolder /path/to/MyApp.app -ov -format UDBZ MyApp.dmg
6868```
6969
7070### Step 2 - Code sign the disk image
7171
7272Disk images must be signed with your Developer ID Application Certificate and include a secure timestamp.
7373
7474Code sign the disk image by opening a Terminal and running the following command:
7575
7676``` bash
7777codesign -s "Developer ID Application: Your Name (Team ID)" --timestamp MyApp.dmg
7878```
7979
8080Note: See [[Code Signing for macOS]] for more details relevant to code signing especially if doing this on aarch64 for an x86_64 binary.
8181
8282### Step 3 - Generate an app-specific password
8383
8484To generate an app-specific password, refer to this [Apple Support article](https://support.apple.com/en-us/HT204397). *Note:* this is a password that will be specific to the notarization application (xcrun notarytool) and not to the application being notarized. You therefore only need to do this once, but make sure you copy the generated password and save it somewhere.
8585
8686> **Tip:** Save the password to your keychain with:\
8787> \
8888> `xcrun notarytool store-credentials "notarytool-password" --apple-id "<AppleID>" --team-id <DeveloperTeamID> --password <secret_2FA_password>`\
8989> \
9090> and then you can use `"@keychain:<name for pwd>"` in the following commands.
9191
9292### Step 4 - Upload the disk image to the notary service
9393
9494> **Note:** When you notarize the container disk image, notarytool also notarizes the application inside, so you can skip the step of notarizing the application itself.
9595
9696Upload the disk image file to the Apple notary service by opening a Terminal and running the following command:
9797
9898``` bash
9999xcrun notarytool submit --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> /Path/to/MyApp.dmg
100100```
101101
102102The response includes an *id* (session-ID) that we use later to keep track of this submission with the notarization service. It will be used again to check on the status.
103103
104104If the upload is successful you should receive output similar to the following:
105105
106106 Conducting pre-submission checks for MyApp.dmg and initiating connection to the Apple notary service...
107107 Submission ID received
108108 id: 43e04940-1601-4959-a40c-79b83172d22b
109109 Upload progress: 100,00% (3,97 MB of 3,97 MB)
110110 Successfully uploaded file
111111 id: 43e04940-1601-4959-a40c-79b83172d22b
112112 path: /Path/to/MyApp.dmg
113113
114114### Step 5 - Check the notarization process
115115
116116The notarization process generally takes less than an hour, and usually just few minutes. They no longer issue emails, so you will need to check its progress from time to time by opening a Terminal and running the following command:
117117
118118``` bash
119119xcrun notarytool info --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> session-ID
120120```
121121
122122When the notarization process completes successfully the above command will return information similar to the following:
123123
124124 Looking up : 43e04940-1601-4959-a40c-79b83172d22b
125125 Successfully received submission info
126126 createdDate: 2024-05-06T10:16:46.448Z
127127 id: 43e04940-1601-4959-a40c-79b83172d22b
128128 name: MyApp.dmg
129129 status: Accepted
130130
131131The possible status results are: In process, Accepted or Failure.
132132
133133Accepted means success in this context. If the status is failure, then further details can be obtained with the "log" command:
134134
135135``` bash
136136xcrun notarytool log --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> session-ID
137137```
138138
139139### Step 6 - Staple the ticket to the disk image
140140
141141The notarization process produces a ticket that tells Gatekeeper that your application is notarized. After notarization completes successfully, the next time any user attempts to run your application on macOS 10.14 or later, Gatekeeper will find the ticket online. This includes users who downloaded your application before notarization.
142142
143143After step 5 receives the "Package Approved" status message, you should also attach the ticket to the disk image file using the stapler tool, so that future distributions include the ticket. This ensures that Gatekeeper can find the ticket even when a network connection is not available.
144144
145145To staple the ticket to the disk image file, open a Terminal and run the following command:
146146
147147``` bash
148148xcrun stapler staple /path/to/MyApp.dmg
149149```
150150
151151If the command completes successfully, the output should be similar to:
152152
153153 Processing: /Path/to/MyApp.dmg
154154 Processing: /Path/to/MyApp.dmg
155155 The staple and validate action worked!
156156
157157Note: While you can staple an installer package and disk image directly, if notarization used a zip file, the application bundle needs to be unzipped and then it can be stapled and rezipped.
158158
159159### Step 7 - Verify notarization of the disk image
160160
161161To verify the notarization of the disk image, open a Terminal and run the following command:
162162
163163``` bash
164164spctl -a -vv -t install MyApp.dmg
165165```
166166
167167A successful verification of the notarization process should produce output similar to the following:
168168
169169 MyApp.dmg: accepted
170170 source=Notarized Developer ID
171171 origin=Developer ID Application: <Developer Name> (<TEAM_ID>)
172172
173173### Step 8 - Verify notarization of the application
174174
175175To verify the notarization of the application, install the application, open a Terminal and run the following command:
176176
177177``` bash
178178spctl -a -vv /Applications/MyApp.app
179179```
180180
181181A successful verification of the notarization process should produce output similar to the following:
182182
183183 /Applications/MyApp.app: accepted
184184 source=Notarized Developer ID
185185 origin=Developer ID Application: <Developer Name> (<TEAM_ID>)
186186
187187**Important:** test the application by putting it in the Applications directory. It's treated differently by the Gatekeeper when in the "installed" location.
188188
189189Alternatively, the Apple-recommended way to verify the notarization of an application is to open a Terminal and run the following command:
190190
191191 xcrun stapler validate MyApp.app
192192
193193A successful verification of the notarization process should produce output similar to the following:
194194
195195 Processing: MyApp.app
196196 The validate action worked!
197197
198198## Notarizing a command line tool
199199
200200Command line tools can be code signed, but they cannot be easily notarized because they do not have an [[Application Bundle]] and a standalone `Info.plist` [[macOS property list files|property list file]]. You can relatively easily insert an `Info.plist` file in your command line tool executable.
201201
202202### Inserting an Info.plist in a command line executable
203203
204204Here is a template that you can customise for your command line utility. I extracted it from a command line utility executable written in C named "simplereach" which I built with Xcode 11.3.1 on Mojave after enabling the "Create Info.plist Section in Binary" under the "Packaging" options (I have omitted the unnecessary Xcode-related build info from it).
205205
206206``` xml
207207<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
208208<plist version="1.0">
209209<dict>
210210 <key>BuildMachineOSBuild</key>
211211 <string>18G8022</string>
212212 <key>CFBundleDevelopmentRegion</key>
213213 <string>English</string>
214214 <key>CFBundleDocumentTypes</key>
215215 <array>
216216 <dict>
217217 <key>CFBundleTypeOSTypes</key>
218218 <array>
219219 <string>fold</string>
220220 <string>disk</string>
221221 <string>****</string>
222222 </array>
223223 </dict>
224224 </array>
225225 <key>CFBundleExecutable</key>
226226 <string>simplereach</string>
227227 <key>CFBundleIdentifier</key>
228228 <string>com.mycompany.simplereach</string>
229229 <key>CFBundleInfoDictionaryVersion</key>
230230 <string>6.0</string>
231231 <key>CFBundleName</key>
232232 <string>simplereach</string>
233233 <key>CFBundlePackageType</key>
234234 <string>APPL</string>
235235 <key>CFBundleShortVersionString</key>
236236 <string>1.0</string>
237237 <key>CFBundleSupportedPlatforms</key>
238238 <array>
239239 <string>MacOSX</string>
240240 </array>
241241 <key>CFBundleVersion</key>
242242 <string>1</string>
243243 <key>LSMinimumSystemVersion</key>
244244 <string>10.14</string>
245245</dict>
246246</plist>
247247```
248248
249249You will need to modify a few key strings in the above file. Substitute your own:
250250
251251- **BuildMachineOSBuild** string can be obtained from a Terminal with the command `sw_vers`. The "18G8022" strong is for Mojave 10.14.6.
252252- **CFBundleDevelopmentRegion** string if it is not "English".
253253- **CFBundleExecutable** string with your utility name.
254254- **CFBundleIdentifier** string (conventionally your domain name in reverse followed by utility name; feel free use anything unique).
255255- **CFBundleName** string (use the same value as for CFBundleExecutable).
256256- **CFBundleShortVersionString** string with your version number.
257257- **LSMinimumSystemVersion** string with the minimum macOS version on which your utility will run.
258258
259259You can then insert the `Info.plist` file into your application by telling the linker to add it as a __TEXT section named __info_plist:
260260
261-`fpc -k"-sectcreate __TEXT __info_plist Info.plist" my_utility.pas`
261+```text
262+fpc -k"-sectcreate __TEXT __info_plist Info.plist" my_utility.pas
263+```
262264
263265To check whether it has been successfully inserted you can run the following command in a Terminal:
264266
265-`otool -X -v -s __TEXT __info_plist my_utility`
267+```text
268+otool -X -v -s __TEXT __info_plist my_utility
269+```
266270
267271### Signing a command line executable
268272
269273Now that the `Info.plist` file has been inserted in the executable, you are ready to code sign it by executing the following commands in a Terminal:
270274
271-`cd /path/to/my_utility`\
272-`mkdir bin`\
273-`mv my_utility bin/`\
274-`codesign -f --strict --timestamp --options=runtime -s "Developer ID Application: YOUR NAME (TEAM_ID)" bin/my_utility`
275+```text
276+cd /path/to/my_utility
277+mkdir bin
278+mv my_utility bin/
279+codesign -f --strict --timestamp --options=runtime -s "Developer ID Application: YOUR NAME (TEAM_ID)" bin/my_utility
280+```
275281
276282It is *critical* that you create the `bin` directory and move your utility to it before signing. Failure to do so will result in a `_CodeSignature directory` being created which is not appropriate for a command line utility and the notarisation process will fail.
277283
278284To verify this was successful you can run the following command in a Terminal:
279285
280-`codesign -vv bin/my_utility`
286+```text
287+codesign -vv bin/my_utility
288+```
281289
282290If code signing was successful, the output should be something similar to:
283291
284-`my_utility: valid on disk`\
285-`my_utility: satisfies its Designated Requirement `
292+```text
293+my_utility: valid on disk
294+my_utility: satisfies its Designated Requirement
295+```
286296
287297### Submitting a command line executable for notarization
288298
289299As you cannot notarize a bare executable, you need to incorporate it into a container (.dmg - Disk Image, .pkg - Installer Package, or a ZIP archive file). A ZIP archive is the simplest so in a Terminal execute the following command:
290300
291-`zip my_utility.zip bin/my_utility`
301+```text
302+zip my_utility.zip bin/my_utility
303+```
292304
293305You are now ready to upload your command line utility to Apple's servers for notarization. In a terminal execute the following command:
294306
295-`xcrun notarytool submit --apple-id "me@mysoftware.com" --password <app-specifc-password>  --team-id <your 10 character team ID> my_utility.zip`
307+```text
308+xcrun notarytool submit --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> my_utility.zip
309+```
296310
297311If you do not already have an app specific password, see above for how to generate one.
298312
299313The response includes an *id* (session-ID) that we use later to keep track of this submission with the notarization service. It will be used again to check on the status.
300314
301315If the upload is successful you should receive output similar to the following:
302316
303317 Conducting pre-submission checks for my_utility.zip and initiating connection to the Apple notary service...
304318 Submission ID received
305319 id: 43e04940-1601-4959-a40c-79b83172d22b
306320 Upload progress: 100,00% (3,97 MB of 3,97 MB)
307321 Successfully uploaded file
308322 id: 43e04940-1601-4959-a40c-79b83172d22b
309323 path: /Path/to/my_utility.zip
310324
311325### Checking the notarization progress
312326
313327The notarization process generally takes less than an hour, and usually just few minutes. They no longer issue emails, so you will need to check its progress from time to time by opening a Terminal and running the following command:
314328
315329``` bash
316330xcrun notarytool info --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> session-ID
317331```
318332
319333When the notarization process completes successfully the above command will return information similar to the following:
320334
321335 Looking up : 43e04940-1601-4959-a40c-79b83172d22b
322336 Successfully received submission info
323337 createdDate: 2024-05-06T10:16:46.448Z
324338 id: 43e04940-1601-4959-a40c-79b83172d22b
325339 name: MyApp.dmg
326340 status: Accepted
327341
328342The possible status results are: In process, Accepted or Failure. Accepted means success in this context. If the status is failure, then further details can be obtained with the "log" command:
329343
330344``` bash
331345xcrun notarytool log --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> session-ID
332346```
333347
334348In case of a notarization failure, consult Troubleshooting below for help.
335349
336350### Verifying notarization of a command line executable
337351
338352To verify the notarization of a command line tool, open a Terminal and run the following command:
339353
340-`spctl -a -t open --context context:primary-signature -vv my_utility `
354+```text
355+spctl -a -t open --context context:primary-signature -vv my_utility
356+```
341357
342358A successful verification of a properly notarized command line executable should produce output similar to the following:
343359
344-`my_utility: accepted`\
345-`source=Notarized Developer ID`\
346-`origin=Developer ID Application: Your Name (Z9HBGNDZZ9)`
360+```text
361+my_utility: accepted
362+source=Notarized Developer ID
363+origin=Developer ID Application: Your Name (Z9HBGNDZZ9)
364+```
347365
348366## Troubleshooting
349367
350368### Notarization upload process
351369
352370If the notarisation upload process does not go well, you should be able to find a compressed log file in your temporary directory which may shed some light on what happened. You can view it by opening a Terminal and running the following commands (substitute the name of your log file which includes your application bundle-id):
353371
354372``` bash
355373 cd ${TMPDIR}
356374 gzcat c51ca05f-cf49-405f-be57-26873faab5f6_3073718126753816760org.sentry.myapp-20191231004646-273.itmsp6022059143057318377.log
357375```
358376
359377which, for a successful notarization upload, should look similar to:
360378
361-` [2019-12-31 19:46:46 AEDT] <main>  INFO: Starting upload for packageName: org.sentry.myapp-20191231004646-273.itmsp`\
362-` [2019-12-31 19:46:46 AEDT] <main>  INFO: Thread Pool Configuration: {processors=12, perCoreThreadMultiplier=1.65, coreThreads=6, maxThreads=14, minConnections=6, maxConnections=13, rateLimit=100000000000 KBs}`\
363-` [2019-12-31 19:46:46 AEDT] <main>  INFO: Reservation CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml created for file: (metadata.xml), part count:(1), file size: (538)`\
364-` [2019-12-31 19:46:46 AEDT] <main>  INFO: Reservation CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/MyApp_31122019.dmg created for file: (MyApp_31122019.dmg), part count:(1), file size: (1400933)`\
365-` [2019-12-31 19:46:46 AEDT] <RLT-002>  INFO: Starting upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml) file: (metadata.xml/1) size: 538`\
366-` [2019-12-31 19:46:46 AEDT] <RLT-003>  INFO: Starting upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/myapp_31122019.dmg) file: (MyApp_31122019.dmg/1) size: 1400933`\
367-` [2019-12-31 19:46:47 AEDT] <RLT-002>  INFO: Finished part upload for: (metadata.xml/1) 2.91 KB/s in 0 seconds`\
368-` [2019-12-31 19:46:47 AEDT] <RLT-002>  INFO: Finished upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml) file: (metadata.xml)`\
369-` [2019-12-31 19:46:47 AEDT] <pool-8-thread-1>  INFO: Reservation committed: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml) file: (metadata.xml)`\
370-` [2019-12-31 19:46:49 AEDT] <RLT-003>  INFO: Finished part upload for: (MyApp_31122019.dmg/1) 781.33 KB/s in 1 second`\
371-` [2019-12-31 19:46:49 AEDT] <RLT-003>  INFO: Finished upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/MyApp_31122019.dmg) file: (MyApp_31122019.dmg)`\
372-` [2019-12-31 19:46:49 AEDT] <main>  INFO: Waiting on reservation commit(s) to finish.`\
373-` [2019-12-31 19:46:49 AEDT] <pool-8-thread-1>  INFO: Reservation committed: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/MyApp_31122019.dmg) file: (MyApp_31122019.dmg)`\
374-` [2019-12-31 19:46:49 AEDT] <pool-8-thread-1>  INFO: All reservation commit(s) finished.`\
375-` [2019-12-31 19:46:49 AEDT] <main>  INFO: 456.36 KB/s in 3 seconds`
379+```text
380+ [2019-12-31 19:46:46 AEDT] <main> INFO: Starting upload for packageName: org.sentry.myapp-20191231004646-273.itmsp
381+ [2019-12-31 19:46:46 AEDT] <main> INFO: Thread Pool Configuration: {processors=12, perCoreThreadMultiplier=1.65, coreThreads=6, maxThreads=14, minConnections=6, maxConnections=13, rateLimit=100000000000 KBs}
382+ [2019-12-31 19:46:46 AEDT] <main> INFO: Reservation CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml created for file: (metadata.xml), part count:(1), file size: (538)
383+ [2019-12-31 19:46:46 AEDT] <main> INFO: Reservation CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/MyApp_31122019.dmg created for file: (MyApp_31122019.dmg), part count:(1), file size: (1400933)
384+ [2019-12-31 19:46:46 AEDT] <RLT-002> INFO: Starting upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml) file: (metadata.xml/1) size: 538
385+ [2019-12-31 19:46:46 AEDT] <RLT-003> INFO: Starting upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/myapp_31122019.dmg) file: (MyApp_31122019.dmg/1) size: 1400933
386+ [2019-12-31 19:46:47 AEDT] <RLT-002> INFO: Finished part upload for: (metadata.xml/1) 2.91 KB/s in 0 seconds
387+ [2019-12-31 19:46:47 AEDT] <RLT-002> INFO: Finished upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml) file: (metadata.xml)
388+ [2019-12-31 19:46:47 AEDT] <pool-8-thread-1> INFO: Reservation committed: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/metadata.xml) file: (metadata.xml)
389+ [2019-12-31 19:46:49 AEDT] <RLT-003> INFO: Finished part upload for: (MyApp_31122019.dmg/1) 781.33 KB/s in 1 second
390+ [2019-12-31 19:46:49 AEDT] <RLT-003> INFO: Finished upload for reservation: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/MyApp_31122019.dmg) file: (MyApp_31122019.dmg)
391+ [2019-12-31 19:46:49 AEDT] <main> INFO: Waiting on reservation commit(s) to finish.
392+ [2019-12-31 19:46:49 AEDT] <pool-8-thread-1> INFO: Reservation committed: (CPUSource113/v4/93/41/ce/9341ce96-e7bc-2577-eaac-4528c888a70d/MyApp_31122019.dmg) file: (MyApp_31122019.dmg)
393+ [2019-12-31 19:46:49 AEDT] <pool-8-thread-1> INFO: All reservation commit(s) finished.
394+ [2019-12-31 19:46:49 AEDT] <main> INFO: 456.36 KB/s in 3 seconds
395+```
376396
377397### Notarization process failures
378398
379399If the when you check you find that the notarization process has failed. For example:
380400
381401 Date RequestUUID Status Status Code Status Message
382402 ------------------------- ------------------------------------ ------- ----------- ----------------
383403 2020-02-29 13:54:08 +0000 fa2e5d79-cba0-469d-bb27-859a8f081821 invalid 2 Package Invalid
384404
385405You can retrieve the URL for the notarization log file with the command:
386406
387407``` bash
388408xcrun notarytool log --apple-id "me@mysoftware.com" --password <app-specifc-password> --team-id <your 10 character team ID> session-ID
389409```
390410
391411which should yield information similar to the following:
392412
393413 No errors getting notarization info.
394414
395415 Date: 2020-02-29 13:54:08 +0000
396416 Hash: 1b08ea5cdf97eb6fed9b959a549d4b325eb5e90f16538139a29a83f75609d87b
397417 LogFileURL: https://osxapps-ssl.itunes.apple.com/itunes-assets/[...]
398418 RequestUUID: fa2e5d79-cba0-469d-bb27-859a8f081821
399419 Status: invalid
400420 Status Code: 2
401421 Status Message: Package Invalid
402422
403423You can then cut and paste the LogFileURL into your web browser and retrieve the notarization process log file which will look something like this:
404424
405425 {
406426 "logFormatVersion": 1,
407427 "jobId": "fa2e5d79-cba0-469d-bb27-859a8f081821",
408428 "status": "Invalid",
409429 "statusSummary": "Archive contains critical validation errors",
410430 "statusCode": 4000,
411431 "archiveFilename": "test.dmg",
412432 "uploadDate": "2020-02-29T13:54:08Z",
413433 "sha256": "1b08ea5cdf97eb6fed9b959a549d4b325eb5e90f16538139a29a83f75609d87b",
414434 "ticketContents": null,
415435 "issues": [
416436 {
417437 "severity": "error",
418438 "code": null,
419439 "path": "test.dmg/MyApp.app/Contents/MacOS/MyApp",
420440 "message": "The executable does not have the hardened runtime enabled.",
421441 "docUrl": null,
422442 "architecture": "x86_64"
423443 }
424444 ]
425445 }
426446
427447In the above failure case, it was because the executable had not been [[Hardened runtime for macOS|hardened]].
428448
429449It is also worthwhile mentioning that it is *always* worth retrieving the notarization log file to check for warnings which are not yet errors so that you can fix them before they do become errors which prevent successful notarization.
430450
431451Here is an example of a notarization process log from a successful notarization:
432452
433453 {
434454 "logFormatVersion": 1,
435455 "jobId": "fa2e5d79-cba0-469d-bb27-859a8f081822",
436456 "status": "Accepted",
437457 "statusSummary": "Ready for distribution",
438458 "statusCode": 0,
439459 "archiveFilename": "test.dmg",
440460 "uploadDate": "2020-03-01T01:50:55Z",
441461 "sha256": "1945554c24da3bb1d587b7c9f968dcbb925b726f2f663b816301928c06593dd9",
442462 "ticketContents": [
443463 {
444464 "path": "test.dmg",
445465 "digestAlgorithm": "SHA-256",
446466 "cdhash": "1d4d033edbecc2baf7ff8ce0fa16691be990595f"
447467 },
448468 {
449469 "path": "test.dmg/MyApp.app",
450470 "digestAlgorithm": "SHA-256",
451471 "cdhash": "7f9d54e76f25807e2b425a09684aa8cb54dcd17f",
452472 "arch": "x86_64"
453473 },
454474 {
455475 "path": "test.dmg/MyApp.app/Contents/MacOS/MyApp",
456476 "digestAlgorithm": "SHA-256",
457477 "cdhash": "7f9d54e762c7907e2b425a09684aa8cb54dcd17f",
458478 "arch": "x86_64"
459479 },
460480 {
461481 "path": "test.dmg/MyApp.app/Contents/Resources/MyApp.help",
462482 "digestAlgorithm": "SHA-256",
463483 "cdhash": "b544a32a216578e7805ca93b968377cdd92f7ec6",
464484 "arch": "i386"
465485 },
466486 {
467487 "path": "test.dmg/MyApp.app/Contents/Resources/MyApp.help",
468488 "digestAlgorithm": "SHA-256",
469489 "cdhash": "b544a32a216578e7805ca93b968377cdd92f7ec6",
470490 "arch": "x86_64"
471491 },
472492 {
473493 "path": "test.dmg/MyApp.app/Contents/Resources/MyApp.help",
474494 "digestAlgorithm": "SHA-256",
475495 "cdhash": "b544a32a216578e7805ca93b968377cdd92f7ec6",
476496 "arch": "x86_64h"
477497 }
478498 ],
479499 "issues": null
480500 }
481501
482502### Notarization check failures
483503
484504If the notarization process succeeds, but when you check whether your application is properly notarized and it does not pass the notarization check successfully, you can use the `Console.app` to inspect the log files for information about the rejection (after trying to launch the blocked application). Be aware you should open the `Console.app` *before* trying to open your blocked application, otherwise not all messages may be logged. You should choose your device in the left sidebar of the `Console.app` and check for the process **XprotectService** in the logs.
485505
486506## See also
487507
488508- [[Apple Developer Certificates]]
489509- [[Code Signing for macOS]]
490510- [[Hardened runtime for macOS]]
491511- [[Signing and Notarization FAQ]]
492512
493513## External links
494514
495515- [Apple: Notarizing your app before distribution](https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution)
496516- [Apple: Notarizing macOS Software Before Distribution](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution)
497517- [Apple: Customizing the Notarization Workflow](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow)
498518- [Apple: Common notarization issues](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues)
499519- [Apple: Using app-specific passwords](https://support.apple.com/en-us/HT204397)
500520- [Notarize FPC](https://github.com/neurolabusc/NotarizeFPC) A script to notarize a command line utility and package it in an installer .pkg file.
501521
502522---
503523*From the Free Pascal wiki, page "Notarization for macOS 10.14.5+", as it stood on 2024-05-06 after a change by Rossh lz, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history