You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

XCFramework not able to run on rosetta enabled simulator on Apple m1

I have created one custom xcframework in native iOS Swift


Now I have created React Native library project and add my custom xcframework in to iOS folder.


And then I use to do pod install to my example/iOS folder to make it run. I am using Apple M1.


When I run my example/iOS project in real device and apple silicon simulator. It’s working fine.


But when I try to run on rosetta simulator I am getting “Unsupported swift architecture”.


My requirement is to support my xcframework on rosetta simulator as well because my clients having dependency on some other library which will run only on rosetta simulator and not on apple silicon simulator.


my clients also running on apple m1 machine with rosetta simulator.


My xcframework structure :


ios-arm64_x86_64-simulator

ios-arm64

Info.plist


I selected rosetta simulator by doing this ( Product - > Destination - > Destination Architecture -> Show Both ). Then I can able to see the rosetta enabled simulators . This error I am getting when I run on rosetta simulator only


The error :-

  • Could not build Objective-C module 'react_native_awesome_module'
  • Unsupported Swift architecture


This error I am getting in ios-arm64 slice path header. I am not sure why its taking wrong slice when I try to run on rosetta simulator


Here is my iOS swift xcframework project :


My react native library project :



I have tried added arm64 as excluded architectire on project level, my custom xcframework ( pod level ). my xcframework will be added as pod in the react native library project. but no luck



[Edited by Moderator]

Simulator, iOS 15

Posted on Feb 18, 2024 4:58 AM

Reply
1 reply

Feb 18, 2024 8:40 AM in response to sathish140

FWIW, Meta React suggests using StackOverflow for code-level questions: https://react.dev/community


This community is more familiar with the Apple native tooling, and less with the cross-platform frameworks.


That written, why Rosetta is involved here with everything using Apple silicon is unclear.


And the Could not build Objective-C module 'react_native_awesome_module' / Unsupported Swift architecture

error is odd too, as no x86-64 and thus no need for Rosetta, and ObjC isn’t Swift.

XCFramework not able to run on rosetta enabled simulator on Apple m1

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.