Why "Open using Rosetta" is still needed to run on Simulator?

Hi,

We ported our app to Apple Silicon and we often need to run our apps on simulator. But to be able to run on Simulator, I need to enable "Open using Rosetta".

Also, under Build Settings → Architectures → Excluded Architectures, I have arm64.

So, with out the need of enabling Open using Rosetta, how wold I be able to run the app on simulator and other platforms - iOS, iPadOS and macOS?

Thank you!

As a general rule you should not run either Xcode or the simulator under Rossetta. It’s hard to say exact why your app won’t work without this but it’s worth investigating and fixing that.

As a first step, let’s check your basic setup. Please create a new test project and run that with both Xcode and the simulator set to run natively. Use a project template that best matches your real app, so if you’re creating an iOS app start with File > New > Project > iOS > App. Does this work as expected?

Share and Enjoy

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

Hello @eskimo, I created a test app and with our "Rosetta" enabled on Xcode, it runs on M1 Mac, iOS and iPad.

And, ours is an enterprise project that uses video and audio calling, maps, Coredata, Bluetooth etc. which has been on AppStore since 2011. It has mix of Obj-C and Swift code. I need to enable "Rosetta" only to be able to run it on Simulator.

But why exactly do you need Rosetta on simulator? Is it due to a 3rd party framework that doesn’t yet have an ARM slice for simulator? If so, the right solution is to get that 3rd party vendor to update their framework. Easier said than done, of course.

ours is an enterprise project that uses video and audio calling

My company’s app has this exact problem due to a framework from the vendor of very well-known video conferencing app (maybe the same one). A workaround that works for many of us is to add a local no-op stub for the framework classes are missing on simulator. (You add the minimum needed to eliminate linker errors.) This lets the app build, and is sufficient for those of us who don’t actually need to use the functional area of the app that uses that particular framework. Maybe this trick could work for you too.

I created a test app and with our "Rosetta" enabled on Xcode

That’s the opposite of the direction I’m recommending. Rather, you should disable Rosetta on Xcode and the simulator and check that a basic test app works as expected. From there you can start investigating why your main app fails to work in that environment, because requiring Rosetta is not going to be viable in the long term.

You may need to apply some sort of workaround, like the one suggested by Scott, but it’ll be worth it. There are important lessons to be learnt from history here.

Share and Enjoy

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

If you don't need to recompile libs I believe it's enough to run iOS Simulator as Rosetta with XCode 14.3. You can change the simulator mode in Product > Destination menu.

Why "Open using Rosetta" is still needed to run on Simulator?
 
 
Q