I'm running into issues creating a valid .pkg
file for Transporter.app. I'm building an Electron app for the Mac App Store. I have a working build that's live, but I've encountered issues on x86 architectures.
The delivery process fails with the following error:
Asset validation failed (90981)
Invalid bundle. The “com.XXXX.***.pkg/Payload/XXXX.app” bundle supports arm64 but not Intel-based Mac computers. Your build must include the x86_64 architecture to support Intel-based Mac computers. For details, view: https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary. (ID: 56e46e1a-6e77-4468-80e6-249ec8990fa8)
My build script that creates the .app
and code signs the application uses the productbuild
utility to create the .pkg
. This is the command:
productbuild --sign "$INSTALLER_KEY" --product "./build/requirements.plist" --component "$APP_PATH" /Applications "$RESULT_PATH"
From my research, I would have assumed that the requirements property list was all that I would need to specify for the .pkg
. This is this contents of /build/requirements.plist/
:
<?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>arch</key>
<array>
<string>arm64</string>
</array>
</dict>
</plist>
The application included in the .pkg
is correctly built for arm64 and I've verified this with:
lipo -archs /Path/To/XXXX.app/Contents/MacOS/XXXX
arm64
Other research ha led me to solutions via Xcode, but as stated at the beginning I'm using Electron.
Any suggestions or insights would be very beneficial.
The Mac App Store requires you to submit universal apps [1]. So, this isn’t a packaging issue but a build issue. You need to build your app for Apple silicon and Intel.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Actually I’m not 100% sure that’s true. It’s possible that Apple silicon isn’t required. However, it’s definitely true that Intel is required.