Testing MAS build locally?

I'm trying to create a package for the Mac App Store using Electron 6.1.9 and Electron builder 21.2.0.

I sign the package with "3rd Party Mac Developer Application" and "3rd Party Mac Developer Installer" certificates and an am using a proper provisioning profile.

It appears to work fine, the build is successful. But I cannot start the resulting app. It crashes immediately with this error:

Exception Type: EXCCRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC
CORPSE_NOTIFY

Termination Reason: Namespace CODESIGNING, Code 0x1

I also tried to a create VM running MacOS Catalina and install and run the app there. The result is the same.

My question is how do I make sure that the MAS package is OK?
How to test this package?

Tools like codesign, pkgutil etc all print the expected output, the signature appears to be fine. Yet I'm still getting invalid signature error.

It’s not possible to run distribution-signed code (the code has to be re-signed by the store before anyone can run it). On iOS you can get around this by publishing your build to TestFlight. Unfortunately TestFlight is not supported on macOS, which means that this isn’t an option here. Your best option is to re-sign the same code using your Developer ID, but that’s clearly less than ideal.

Share and Enjoy

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

TestFlight is now supported on macOS.

And there was much rejoicing.

Could you please confirm whether TestFlight is supported for macOS apps built without Xcode … ?

Confirmed. TestFlight uses the same distribution channel as the Mac App Store, and thus if your app will fly (hey hey) on the Mac App Store, it’ll also do so on TestFlight.

Share and Enjoy

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

Testing MAS build locally?
 
 
Q