1. Knowledge Base
  2. Uploading and installing apps

How can I upload an iOS build using a Mac with M1/ARM architecture?

On an M1 Mac, the command listed on the Appetize docs produces a build that works for Appetize. Here are more details, which may be helpful as guidance.

On an M1 Mac, the command listed on the Appetize docs produces a build that works for Appetize. Here are more details, which may be helpful as guidance.

Option 1: Create a “universal binary” with multiple slices (x64 + ARM)

As long as the universal binary includes an x64 slice, Appetize handles them fine. When you inspect a universal binary with the `file` command, you should see something like this:
LogTester: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
LogTester (for architecture x86_64): Mach-O 64-bit executable x86_64
LogTester (for architecture arm64): Mach-O 64-bit executable arm64
In Xcode, set “Build Active Architecture Only” to No (it’s set to Yes by default in Debug configurations).
xcode-architectures
 
Then use Xcode to build to any simulator as usual. The binary located here will have both slices: ~/Library/Developer/Xcode/DerivedData/<project-name>/Build/Products/Debug-iphonesimulator/
On the command line, the command currently listed in the Appetize docs create a universal binary with an x64 and an ARM slice:
xcodebuild -sdk iphonesimulator -scheme <SchemeName> -project <ProjectName> -configuration Debug build

 

(It works without modification on an M1 because ONLY_ACTIVE_ARCHS defaults to No if not passed in)

Option 2: Use Rosetta

- Set Xcode to open using Rosetta (Right click on app icon, Get Info, check “Open using Rosetta”
- Building to the Simulator will always produce an x86_64 slice, even if “Build Active Architecture Only” is set to Yes.