Unsupported Architectures. Your executable contained the following disallowed architectures: i386
Closed this issue · 6 comments
I receive the following error when uploading to the mac app store.
ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: '[i386 (in package.pkg/Payload/AppName/Contents/MacOS/JavaAppLauncher)]'. New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018."
My build.xml has the <arch name="x86_64"/
> added to it.
I tried packing with java 1.8 and openjdk 11
any Ideas?
Can you paste the section of your build.xml? Within that section I have <arch name="x86_64"/>
which I would think would do it. If you're including x86/i386 then it will fail because the app store no longer takes 32 bit binaries. That shouldn't be a problem since macOS has been 64 bit for so long now and it's been a while since any modern mac JVM has been available as 32 bit.
`
<target name="bundle-USBUtility">
<bundleapp outputdirectory="dist"
jvmrequired="1.8"
name="AppName"
displayname="AppName"
identifier="com.app.name"
icon="src/assets/icon.icns"
shortversion="1.4"
version="1.4"
executableName="AppName"
applicationCategory="public.app-category.developer-tools"
copyright="2021"
mainclassname="sample.Main">
<arch name="x86_64"/>
<runtime dir="/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home" />
<classpath file="dist/app.jar" />
<classpath file="lib/additionalJar.jar" />
<plistentry key="NSRequiresAquaSystemAppearance" value="true" type="boolean"/>
<plistentry key="CFBundleIdentifier" value="com.app.name" />
<plistentry key="LSFileQuarantineEnabled" value="true" type="boolean" />
<plistentry key="NSHumanReadableCopyright" value="1.4" type="string"/>
<plistentry key="LSMinimumSystemVersion" value="10.6" type="string"/>
</bundleapp>
</target>
`
Hmm.. here's mine which seems to work, although I haven't pushed a new version to the app store in a few months:
<bundleapp
classpathref="runclasspath"
outputdirectory="${dist}"
name="${bundle.name}"
displayname="${bundle.name}"
identifier="${bundle.id}"
shortversion="${version.public}"
version="${version.internal}"
icon="icons/desktop_icon.icns"
executableName="Moneydance"
mainclassname="Moneydance"
copyright="2021 The Infinite Kind, Limited"
applicationCategory="public.app-category.finance"
minimumSystemVersion="10.11"
highResolutionCapable="true"
>
<runtime dir="${runtime}/Contents/Home"/>
<arch name="x86_64"/>
... more unrelated stuff ...
I wonder if removing the jvmrequired attribute helps?
What do you see when running file Contents/MacOS/*
from within your app bundle?
Do you by any chance have any extra .dylibs that might be 32 bit?
I wonder if removing the jvmrequired attribute helps?
No luck there
Do you by any chance have any extra .dylibs that might be 32 bit?
I have nothing external besides java, I have a jar that uses a 64 bit usb library (the dylib is embedded).
Contents/MacOS/App: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [i386:Mach-O executable i386] Contents/MacOS/App (for architecture x86_64): Mach-O 64-bit executable x86_64 Contents/MacOS/App (for architecture i386): Mach-O executable i386
I don't think it's a codesigning thing, but the i386 slice of your executable is likely the problem. I don't know why it's in there... maybe something leftover in the appbundler jar that you have. I'm probably using a modified version, but it's probably long past time for appbundler to generate only 64-bit executables.
A quick fix would be to remove it using the 'lipo' command... something like lipo -remove i386 Contents/MacOS/App
Wrong appbundler version, built using the source and Apple is accepting it as 64bit. thank you for your help.