Why does opening a .pkg file on M1 Mac result in prompt to install Rosetta 2?

Why does opening a .pkg file on an M1 Mac cause the prompt to install Rosetta 2 appear? I would've thought there would be a Universal version of the installer application included with Big Sur. I couldn't find any updated information on how we're to distribute software outside of the App Store on Macs with Apple Silicon. I've already got a Universal version of my application and all of its necessary resources in a .pkg file but my users are confused by the prompt to install Rosetta 2 when trying to install my software.

Accepted Reply

https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW41

hostArchtectures="x86_64,arm64"

We were able to solve this problem by specifying arm64 in hostArchtectures attribute.

Replies

https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW41

hostArchtectures="x86_64,arm64"

We were able to solve this problem by specifying arm64 in hostArchtectures attribute.
Awesome! I knew it had to be simple because it just didn't make any sense that the installer would not be a universal binary.
typo:

hostArchtectures

hostArchitectures

sorry!
Just to help others get started, this is what the top of my Installer.pkg/Distribution file now looks like:

Code Block
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-script minSpecVersion="1.0">
<options customize="always" hostArchitectures="x86_64,arm64"/>