2

In Xcode 12, created a small universal app. The app "Get Info" shows two checkboxes: "Stationery pad" and "Locked", but not "Open using Rosetta", which I need.

I verified that the binary is universal (has two architectures: x86_64 and arm64).

Is there a hidden option or a info.plist flag I must enable for that?

gil_mo
  • 575
  • 1
  • 6
  • 27
  • "Stationery pad" shouldn't be shown for apps. Is this actually a full application (i.e. a directory with a name ending in ".app", with a "Contents" subdirectory, which contains Info.plist, version.plist, a MacOS subdirectory, etc), or is it just a bare command-line binary? – Gordon Davisson Aug 24 '22 at 09:36
  • It is a command-line binary. Don't those get a chance to open using Rosetta? – gil_mo Aug 24 '22 at 09:51
  • 1
    Command-line binaries aren't run via launch services, like apps are, so the mechanisms are different. Try `arch -x86_64 /path/to/binary` – Gordon Davisson Aug 27 '22 at 20:56
  • 1
    @GordonDavisson Thanks, could you pls post this as an answer, (to be accepted)? – gil_mo Aug 29 '22 at 09:55

1 Answers1

2

To work around this for application development:

You will need to build with this Property List Key LSRequiresNativeExecution disabled.

An excerpt from the Apple Documentaion:

... this key prevents the system from using the Rosetta translation process to execute the Intel portion of a universal app on Apple silicon.

For command line programs you can simply do this:

arch -x86_64 /path/to/program
gil_mo
  • 575
  • 1
  • 6
  • 27
James Risner
  • 5,451
  • 11
  • 25
  • 47