Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Flutter and app store releases

A notarized Mac app still shows the unverified developer alert

Your error

“MyApp.app” cannot be opened because the developer cannot be verified.1 more line it can show

Fix it fast

Most common cause, 1 of 3

The ticket is not attached to the copy you ship

Staple the .app, disk image or installer package after the notary service accepts it.

Fix
xcrun stapler staple "MyApp.app"
/usr/bin/ditto -c -k --keepParent "MyApp.app" "MyApp.zip"
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

macOS shows “cannot be opened because the developer cannot be verified” on a notarized app when Gatekeeper cannot find the ticket or rejects a signature that notarization only warned about. Staple the ticket to the .app, .dmg or .pkg before shipping, read the notarytool log, and assess the downloaded copy with spctl. Applies to Xcode 27.2 on macOS 27.

  • Applies to Xcode 27.2 (notarytool, stapler), macOS 27.2, macOS 26.6
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Download your app the way a customer would, then ask the system policy whether that exact copy may run. Testing the build folder hides problems that only the shipped copy has.

Run this first
spctl -vvv --assess --type exec /Applications/MyApp.app

Then find the line you see in this list and open its fix:

  1. 1The ticket is not attached to the copy you shipThe alert shows up mostly on Macs with no internet, a filtering proxy or a firewall, and you uploaded a ZIP to the notary service
  2. 2Notarization accepted the build with warnings Gatekeeper enforcesspctl rejects the app even on a connected Mac, and the notary log lists warnings although the status says Accepted
  3. 3A custom installer or downloader puts unnotarized files on diskThe installer opens fine, but the app it installs, or a component it downloads, is the one macOS blocks

What does the error look like?

  • “MyApp.app” cannot be opened because the developer cannot be verified.
  • status: Accepted

Cause 1 of 3

The ticket is not attached to the copy you ship

You seeThe alert shows up mostly on Macs with no internet, a filtering proxy or a firewall, and you uploaded a ZIP to the notary service

Check

An app can pass notarization and still trigger the unverified developer alert when its ticket lives only on Apple's servers. Gatekeeper looks the ticket up online at first launch unless it is stapled. A ZIP is the usual trap: notarytool accepts it, yet stapler cannot write into a ZIP, so the app inside ships without its ticket.

Check
grep -rn "stapler staple" scripts/ .github/workflows/

Fix

Staple the .app, disk image or installer package after the notary service accepts it. For a ZIP upload, staple the app itself and then build a fresh ZIP from the stapled app with ditto.

Fix
xcrun stapler staple "MyApp.app"
/usr/bin/ditto -c -k --keepParent "MyApp.app" "MyApp.zip"

Verify

Copy the new download to a Mac with Wi-Fi turned off and open it. macOS asks for the usual first-launch approval instead of showing the unverified developer alert.

Verify
spctl -vvv --assess --type exec /Applications/MyApp.app

Confirmed by developer.apple.com

Did this fix it?

Cause 2 of 3

Notarization accepted the build with warnings Gatekeeper enforces

You seespctl rejects the app even on a connected Mac, and the notary log lists warnings although the status says Accepted

Check

For software it treats as preexisting, the notary service relaxes some rules, so an Accepted submission can still carry signing problems that Gatekeeper refuses at launch. Apple asks developers to read the log after every submission, successful ones included. A strict codesign check shows which nested file is wrong.

Check
codesign -vvv --deep --strict /Applications/MyApp.app

Fix

Sign every nested binary and framework with your Developer ID Application certificate, the hardened runtime and a secure timestamp, sign the outer app last, then submit again and staple the new ticket.

Fix
codesign --force --options=runtime --timestamp --sign "Developer ID Application: Example Ltd (TEAMID)" "MyApp.app/Contents/Frameworks/Helper.framework"
codesign --force --options=runtime --timestamp --sign "Developer ID Application: Example Ltd (TEAMID)" "MyApp.app"
xcrun notarytool submit MyApp.zip --keychain-profile "notarytool-password" --wait

Verify

The new notary log has an empty issues list, and codesign -dvv prints a Timestamp line with a date for the app.

Verify
codesign -dvv /Applications/MyApp.app

Confirmed by developer.apple.com

Did this fix it?

Cause 3 of 3

A custom installer or downloader puts unnotarized files on disk

You seeThe installer opens fine, but the app it installs, or a component it downloads, is the one macOS blocks

Check

Notarizing a third-party installer covers the installer, not the files it writes or fetches later. Apple requires two rounds here: the payload first, then the installer that carries it. A network installer needs the downloaded items notarized on their own.

Check
spctl -vvv --assess --type exec "/Applications/MyApp.app"

Fix

Notarize and staple the payload, place the stapled items into the installer, then notarize the installer as a separate submission. Host only stapled, notarized files for a network installer to download.

Fix
xcrun notarytool submit Payload.zip --keychain-profile "notarytool-password" --wait
xcrun stapler staple "MyApp.app"
xcrun notarytool submit MyInstaller.dmg --keychain-profile "notarytool-password" --wait
xcrun stapler staple "MyInstaller.dmg"

Verify

After a fresh install on a clean Mac, the installed app launches without the alert and spctl accepts it at its final location.

Verify
spctl -vvv --assess --type exec /Applications/MyApp.app

Confirmed by developer.apple.com

Did this fix it?

How do I stop it coming back?

  • Make stapling a release step that fails the pipeline when stapler returns an error, and build the ZIP only after it.
  • Save the notary log of every release next to the build and fail CI when its issues list is not empty.
  • Run spctl against a downloaded copy on a second Mac before each public release, not against the Xcode export folder.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.