12

I'm really tired of checking this option manually for Xcode, which I cannot duplicate due to its size... maybe there is a way to create some kind of shortcut to launch an app (Xcode in my case) with the specific value of "Open using Rosetta"?

Note: this question relates only to Apple Silicon Macs.

Example of the "Open using Rosetta" option in Finder: enter image description here

goldwalk
  • 341
  • 1
  • 2
  • 11

2 Answers2

4

LaunchServices are keeping track.

See ~/Library/Preferences/com.apple.LaunchServices/com.apple.LaunchServices.plist: Architectures for arm64 dictionary.

goldwalk
  • 341
  • 1
  • 2
  • 11
4

Modifying com.apple.LaunchServices.plist only works after reboot. You could call the private function _LSSetArchitecturePreferenceForApplicationURL defined in CoreServices.framework. This is what finder does when you check/uncheck "Open Using Rosetta."

I have created a small utility that does this: https://github.com/tapthaker/SetArchPrefForURL

Tapan Thaker
  • 362
  • 5
  • 13