Clear Rosetta Flag for Desktop App

A little bit of background: If you make an app with no compiled Arm64 binaries in the Content/MacOS folder, MacOS erroneously identifies it as an Intel based app. After launching the app, MacOS will prompt the user to install rosetta, despite the app running fine natively. I found a simple solution to this issue, either include a do-nothing compiled binary to Contents/MacOS, or add

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

to the plist.

The problem is this change only fixes the issue if you also change the BundleID. If you run the app even once with the bad configuration, MacOS seems to cache the intel flag somewhere based on the BundleID. It does not seem to be cached in the usual places.

How to reproduce: (On apple silicon)

  1. You probably already have rosetta, and it is a pain to remove, so a VM is likely needed.
  2. Make an empty app with Script Editor, export with file format: Application.
  3. Replace Example.app/Content/MacOS/applet with a script of the same name. Make sure the old applet is gone, don't rename it and leave it in the directory. I used:
#!/usr/bin/osascript
display dialog "Hello, world"
  1. Make it executable sudo chmod +x ./Example.app/Content/MacOS/applet
  2. Run the app and observe that it asks you to install rosetta
  3. Add the previously mentioned fix to you plist, including the BundleID change
  4. Run it again and observe that it now works
  5. Change your BundleID back. Running this now raises the rosetta prompt despite the fact that it runs fine on a clean install of MacOS.

Things I have tried:

  • Rebooting, no effect
  • Reforming the app, no effect
  • Reboot in recovery mode, no effect
  • lsregister -delete, no effect
  • ~/Library/Preferences, ~/Library/Caches, /Library/Preferences, and /Library/Caches, none contain an entry for the BundleId
  • defaults delete, domain not found
Answered by DTS Engineer in 798880022

I generally recommend that you not create an app whose main executable is a script. This Rosetta issue is a new one on me, but doing this will create other issues as well [1].

Share and Enjoy

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

[1] Like the TCC issue I discuss in On File System Permissions.

I generally recommend that you not create an app whose main executable is a script. This Rosetta issue is a new one on me, but doing this will create other issues as well [1].

Share and Enjoy

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

[1] Like the TCC issue I discuss in On File System Permissions.

Clear Rosetta Flag for Desktop App
 
 
Q