Testing an iOS App using a M1 Mac
I recently got an M1 Mac but our iOS application was still built using the x86_64 architecture. I’ll discuss what I needed to do in order to run our XCUITests against it and issues I encountered. In the end, we ended up creating a scheme where we ported our app to the Apple Silicon arm64 architecture.
In order to run an iOS app built using the x86_64 architecture, you will need to install Rosetta. You can do this by running softwareupdate — install-rosetta.
You will then have to run Xcode using Rosetta. Right click on XCode and select Get Info. Check the box for Open using Rosetta.
Next, you will need to set the simulators to also open using Rosetta. Right click on Xcode and select Show Package Contents. Go to Contents > Developer > Applications. Right click on Simulator and select Get Info. Select the option to Open using Rosetta.
x86_64 Arch Issues
Even with using Rosetta, I still ran into issues when running our XCUITests.
- The worst issue by far is that Xcode frequently crashed or the simulators would crash. I posted about the issue here and it seemed to happen more often when running the tests with parallel mode enabled, but still happened frequently even with it disabled.
- SwipeUp and Swipe Right does not work on the simulators for XCUITests.
Once we ported the app to the arm64 architecture, I no longer had these issues.