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

60 views Asked by At

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 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 :

https://www.dropbox.com/scl/fi/pint4g7y5sqmv98fd54a5/ShowToast.zip?rlkey=lo30jbtnzdafrrlnsk1or212q&dl=0



My react native library project :

https://www.dropbox.com/scl/fi/v55d5oznmvctriq99v605/react-native-awesome-module.zip?rlkey=xlj9h4ocd4pcx96bkmy1uqq5n&dl=0

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

0

There are 0 answers