Code Signature Invalid for MacOS app

Hi,

I am trying to build, archive and create MacOS release app without hosting to app store.

steps:

  1. Changed scheme to Any Mac (Apple Silicon, Intel)

  2. Build Created

  3. Archived

  4. click on Distribute App > Selected App Store Connect > Selected Export >

Preparing app record clicked skip > App store connect distribution options clicked next > Re-sign Mac Tracker clicked next > Clicked Export.

  1. *.pkg file Created.

  2. installed App in new Mac.

  3. App installed in Applications folder.

  4. App crashes with error "Code Signature Invalid" when trying to open the App.

Answered by DTS Engineer in 745754022

You’ve gone down the wrong path here. If you want to ship independently, you need to use Developer ID signing. So, in the Xcode organiser, click Distribute App and then select Developer ID rather than App Store Connect.

Two things to note:

  • You’ll have to notarise your app but, at least in the simple case, Xcode can take care of that for you. For more background on this, see the various links in Notarisation Resources.

  • If you stick with Xcode the final result is an app, which you’ll need to package in, say, a zip archive in order to ship to customers. For info on how to do that, see Packaging Mac Software for Distribution.

ps The reason why your app crashed is that you can’t, in general, run code that’s signed for App Store distribution. See Don’t Run App Store Distribution-Signed Code.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

If you want to release "without hosting to app store", why would you select App Store Connect?

Accepted Answer

You’ve gone down the wrong path here. If you want to ship independently, you need to use Developer ID signing. So, in the Xcode organiser, click Distribute App and then select Developer ID rather than App Store Connect.

Two things to note:

  • You’ll have to notarise your app but, at least in the simple case, Xcode can take care of that for you. For more background on this, see the various links in Notarisation Resources.

  • If you stick with Xcode the final result is an app, which you’ll need to package in, say, a zip archive in order to ship to customers. For info on how to do that, see Packaging Mac Software for Distribution.

ps The reason why your app crashed is that you can’t, in general, run code that’s signed for App Store distribution. See Don’t Run App Store Distribution-Signed Code.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Code Signature Invalid for MacOS app
 
 
Q