-4.6 C
New York
Monday, December 23, 2024

macos – Reset Rosetta Flag for Desktop App


Somewhat little bit of background: When you make an app with no compiled Arm64 binaries within the Content material/MacOS folder, MacOS erroneously identifies it as an Intel based mostly app. After launching the app, MacOS will immediate the person to put in rosetta, regardless of the app working fantastic natively. I discovered a easy resolution to this situation, both embrace a do-nothing compiled binary to Contents/MacOS, or add

    <key>LSArchitecturePriority</key>
    <array>
        <string>arm64</string>
    </array>

to the plist. I posted the answer right here Shell script utility bundle prompts for Rosetta set up

The issue is this modification solely fixes the difficulty when you additionally change the BundleID. When you run the app even as soon as with the unhealthy configuration, MacOS appears to cache the intel flag someplace based mostly on the BundleID. It doesn’t appear to be cached within the traditional locations.

The way to reproduce: (On apple silicon)

  1. You most likely have already got rosetta, and it’s a ache to take away, so a VM is probably going wanted.
  2. Make an empty app with Script Editor, export with file format: Software.
  3. Substitute Instance.app/Content material/MacOS/applet with a script of the identical title. Be certain that the previous applet is gone, do not rename it and depart it within the listing. I used:
#!/usr/bin/osascript
show dialog "Howdy, world"
  1. Make it executable sudo chmod +x ./Instance.app/Content material/MacOS/applet
  2. Run instance.app and observe that it asks you to put in rosetta
  3. Add the beforehand talked about repair to you plist, together with the BundleID change
  4. Run it once more and observe that it now works
  5. Change your BundleID again. Operating this now raises the rosetta immediate even supposing it runs fantastic on a clear set up of MacOS.

Issues I’ve tried:

  • Rebooting, no impact
  • Reforming the app, no impact
  • Reboot in restoration mode, no impact
  • lsregister -delete, no impact
  • ~/Library/Preferences, ~/Library/Caches, /Library/Preferences, and /Library/Caches, none include an entry for the BundleId
  • defaults delete, area not discovered
  • signing app, no impact

I’m not nice with MacOS so it’s potential I’m overlooking one thing easy.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles