DEV Community

Md Ibrahim Hassan
Md Ibrahim Hassan

Posted on

Compile Xcode Project with Google Maps dependency for simulator on M1 macs

I was trying to build a project with GoogleMaps 6.2.1 added via Cocoapods on an M1 Pro MacBook Pro. GoogleMaps still needs to adopt the new xcframework with support for arm64 for the simulator.

In earlier versions of Xcode, we could run Xcode via Rosetta and Google Maps used to compile.
In the recent versions of Xcode, the option to run it via Rosetta is not present.

Xcode Rosetta support comparision

So how do we get around this?

Apple hasn't stopped supporting Rosetta (yet). They have, in fact made it more manageable. Instead of making the Xcode run using Rosetta, in Xcode 15, we can select destination architecture per project within Xcode.

Here is how we use a Rosetta simulator for a Xcode Project.
If you want to run the project in the simulator under Rosetta, try this:**
Xcode -> Product (in the menu bar) -> Destination -> Destination Architectures -> check 'Show Rosetta Destination'**.
After that, all devices in the build list should be able to have '(Rosetta)' in the end.

Open Destination with Rosetta
Rosetta supported simulator destinations

References:
https://sarunw.com/posts/open-using-rosetta-in-xcode-14-3/
https://developer.apple.com/forums/thread/736886?answerId=769030022#769030022

Top comments (0)