Prompt to install Rosetta 2 message

Hi,

I created bundle (signed and notarized) using PyInstaller and currently it support only Intel. When I try to run the executable on Mac without Rosetta it fails and not prompt install Rosetta message.

How can I show this message ?

Thanks

Answered by DTS Engineer in 735666022

Ah, OK, then that won’t work. The Rosetta check is implemented deep in the system, but not that deep. It kicks in for all the common user-level scenarios, including launching the app from the Finder, but code you run from a shell in Terminal goes straight to the kernel (via fork/exec).

Share and Enjoy

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

There isn’t a specific API to show this message. Rather, it automatically kicks in when you try to launch an Intel app on your Apple silicon machine.

I suspect that there’s something about the way that your app is packaged that’s triggering this. Let’s start with something basic: When you look at the main executable of your app, is that an Intel binary? Or a script?

To check this:

  1. First find the name of your main executable.

  2. Then run file against that name in Contents/MacOS.

For example, for the Pacifist app I see this:

% /usr/libexec/PlistBuddy -c "print :CFBundleExecutable" Pacifist.app/Contents/Info.plist 
Pacifist

and then this:

% file Pacifist.app/Contents/MacOS/Pacifist 
Pacifist.app/Contents/MacOS/Pacifist: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
…

confirming that it’s a universal binary.

Share and Enjoy

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

Thanks for the quick reply, My executable is binary I get "Mach-O 64-bit executable x86_64" when I run file command.

Thanks

My executable is binary

OK.

Earlier you wrote:

When I try to run the executable on Mac

Just to confirm, by “run the executable” you meant “double click it in the Finder”, right?

Share and Enjoy

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

Actually not, this is console application, so we run it from the terminal. {bundle_path}/Contents/MacOS/my_executable

Accepted Answer

Ah, OK, then that won’t work. The Rosetta check is implemented deep in the system, but not that deep. It kicks in for all the common user-level scenarios, including launching the app from the Finder, but code you run from a shell in Terminal goes straight to the kernel (via fork/exec).

Share and Enjoy

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

Prompt to install Rosetta 2 message
 
 
Q