I've built everything natively for arm64, the M1 doesnt have Rosetta 2 installed. The app runs fine when started from the terminal.
I am packaging the .app exactly the same way as for x86_64 but it refuses to launch on an M1 mac.
I see "You do not have permission to open the application 'APPNAME'" when trying to open the app. I've tried when both codesigned and not codesigned (both work on x86 dev machine).
In Console.app I see:
Code Block LAUNCH: Runningboard launch of com.mydomain.myapp <private> returned RBSRequestErrorFailed, error Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600007803450 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}, so returning -10826
The app launches using shell scripts, I've tried to modify the plist to launch the executable directly to see whether it was the issue, but it didnt change anything.
The way its starting makes me think it doesnt even try to launch the executable and that its failing right away when looking at something in the package, but I have no idea what it could be.
I've been at this for hours, any help would be appreciated.
Cheers
I have the same issue. A .app that starts with a script in Contents/MacOS. Works fine on an Intel Mac or an M1 machine with Rosetta 2 installed. Does not work on an M1 Mac without Rosetta 2.
% open -a DecoderPro.app The application /Applications/JMRI/DecoderPro.app cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2436, NSUnderlyingError=0x13d711060 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x13d711870 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}}}
Starting the script works:
% open DecoderPro.app/Contents/MacOS/StartJMRISomehow, starting on M1-only is doing something different from starting with M1-plus-Rosetta-2