It's been a while since Apple released the M1 chip device，Although I applied for DTK equipment at the first time，But for some reasons，Until Apple Recycles Equipment，I couldn't touch it myself。In short，The drop grid input method macOS still successfully supports the Apple architecture by blind typing，I.e. arm64，According to user feedback，The effect is ok。
Until some users say that although the app supports the m1 chip，But the installation package does not work-when running the pkg installation package，Rosetta 2 pops up...
Although it does not actually affect the app of the payload in the actual pkg，But it’s a headache to always say one more thing to explain，So I started to think of a way to solve this problem。
I am using Packages To generate the pkg installation package，Graphical configuration，One-click generation，Can sign by the way，And comes with a command line version，After creating the project file，Automated generation with command line，Very fragrant...but this app hasn't been updated for a long time，I thought about trying to write an email to the developer... So the email sent to firstname.lastname@example.org was bounced... Okay，Email is no longer available，It seems that the developer cannot be reached。
I started looking for other solutions，In fact, you can only use productbuild directly to generate pkg，Generally speaking, the operation is very complicated，In fact, you must first use pkgbuild to generate a simple pkg installation package (if you have multiple packages，We have to use it to generate each one)，Then use productbuild to merge them into one。
Here comes the point ⚠️ ：In the configuration parameters of productbuild， hostArchitectures This option should be added，And the value is x86_64,arm64 In this way, the newly generated pkg installation package can be recognized by the system of the m1 chip，So as not to trigger Rosetta 2 translation。
In this case...Since it's just a parameter，Can Packages be changed? Flipped its settings，I really found it!
Packages open advanced options
By default, Packages does not expose this setting，This is an advanced option。First of all，You have to turn on the "Show advanced options" feature in the settings：
Then go back to the project settings interface (Project→Settings) at the bottom and there is Advanced Options (Advanced Options)
We found hostArchitectures And write x86_64,arm64 ，perfect：
Original article written by Gerber drop-off：R0uter's Blog » Use Packages to create a pkg installation package that supports Apple M1 chip
Reproduced Please keep the source and description link：https://www.logcg.com/archives/3481.html