Univeral installer for M1/Intel app

Hello everyone,

I have an application that I need to build in a way that at the end 2 .pkgs are coming out. One for M1 processors and one for Intel.

Now I am thinking about distribution. Is there a way where one can create a universal installer that has the possibility to choose for itself between those versions (.pkgs) based on the host processor? Or any other way of distribution where the user does not take care which version they will download, but where one universal installer is provided that should decide for itself which of the 2 .pkgs will be installed?

why? The easiest thing to do is build a Universal application, at some (usually small cost) to the user in disk space.

If you really must do this, you'll need to read up on the documentation for installers: https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW7 and consult the man pages for pkgbuild and/or productbuild. Somewhere in there, you'll probably find that you can restrict what is installed based on arch.

I agree with ssmith_c here: Life is a lot simpler, for you and your users, if you ship a universal app. This is especially important in managed environments, where the site manager may install the app in one place and then different users, some on Intel and some on Apple silicon, end up running it from there.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Univeral installer for M1/Intel app
 
 
Q