Reputation: 85
I'm trying to make a mac app bundle. It is bundled around a shell file. The structure is like this:
App
Contents
Info.plist
App.command
MacOS
Resources
App.icns
However, when I double click on the app bundle, it shows the following prompt:
To open classroom.command, you need to install Rosetta. Would you like to install it now?
It seems that my app bundle is not intel-based. But it doesn't make sense. Shell scripts have nothing to do with what platform it is right?
I verified it by getting info on the .app root folder. I can see that the "Kind" is "Application". Whereas on other launchable apps, I see that the "Kind" is "Application (Intel)". Is there something I missed from Info.plist?
Upvotes: 1
Views: 275
Reputation: 1935
It looks like MacOS assumes it's Intel unless told explicitly that it supports ARM64.
I've been able to do that by adding the file /Contents/Info.plist
with this contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>run</string>
<key>CFBundleIdentifier</key>
<string>com.testing</string>
<key>LSArchitecturePriority</key>
<array>
<string>arm64</string>
</array>
<key>LSRequiresNativeExecution</key>
<true/>
</dict>
</plist>
Also, the LSArchitecturePriority
value seems to be cached (or at least Rosetta would not re-consider running the app)... and it seems that changing the CFBundleIdentifier
to anything else was enough to get it to try again.
I don't think this is relevant, but I did see someone mention that arm64 programs needed to be signed, I had been trying to do that with the following (using the ad-hoc identity), but I don't think it's necessary (maybe it's required for binaries):
codesign --timestamp --options=runtime -s "-" testing.app
Upvotes: 0
Reputation: 3494
Rosetta is a piece of software through which PowerPC code can be run on an Intel Mac. Sow depending on your proccessor,OS you might need to instal it to run the application.
Upvotes: -1