Proper boolean value for LSRequiresNativeExecution key

According to the page for "Building a universal macOS binary", I see the following excerpt: "If you never want users to run your app under Rosetta translation, add the LSRequiresNativeExecution key to your app’s Info.plist file. When that key is present and set to YES, the system prevents your app from running under translation."


I have an app for the Acme text editor, and it runs a script as the CFBundleExecutable. According to the same page above, it says "For example, the system runs script-only apps under Rosetta translation." I do not want Acme to run under Rosetta translation. I am trying to force it to run with native execution. If I set the value of the LSRequiresNativeExecution key to <true/>, it does not obey the key and does not force native execution. However, if I set the value for that key to <boolean>true</boolean>, it does force native execution. Only problem is, I don't think <boolean>true</boolean> is valid syntax for a plist as if I reset the LaunchPad, the app is no longer available to launch. It disappears. If I switch it back to <true/>, the app is available to launch but does not run with native execution again.


My question is, is there a syntax where "set to YES" is viable? I tried <string>YES</string> but that does not work.

MacBook Pro (M2 Pro, 2023)

Posted on May 6, 2024 2:34 PM

Reply
2 replies

May 6, 2024 4:24 PM in response to rcatano-aip

rcatano-aip wrote:

According to the page for "Building a universal macOS binary", I see the following excerpt: "If you never want users to run your app under Rosetta translation, add the LSRequiresNativeExecution key to your app’s Info.plist file. When that key is present and set to YES, the system prevents your app from running under translation."

I have an app for the Acme text editor, and it runs a script as the CFBundleExecutable. According to the same page above, it says "For example, the system runs script-only apps under Rosetta translation." I do not want Acme to run under Rosetta translation. I am trying to force it to run with native execution. If I set the value of the LSRequiresNativeExecution key to <true/>, it does not obey the key and does not force native execution. However, if I set the value for that key to <boolean>true</boolean>, it does force native execution. Only problem is, I don't think <boolean>true</boolean> is valid syntax for a plist as if I reset the LaunchPad, the app is no longer available to launch. It disappears. If I switch it back to <true/>, the app is available to launch but does not run with native execution again.

My question is, is there a syntax where "set to YES" is viable? I tried <string>YES</string> but that does not work.



re: Acme text editor is this a stand alone application?


See the get info pane: Command i


an example


May 6, 2024 4:45 PM in response to rcatano-aip

The app doesn't say anything about scripts or forcing native execution. It only prevents a translated execution and only then if the app is Intel and linked against the macOS 11 SDK or later.


It sounds like the Acme text editor is one of those cleverly-crafted open source quasi-apps. The problem isn't the plist key. It's the app architecture, whatever it is.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Proper boolean value for LSRequiresNativeExecution key

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.