React Native: how to run flipper with apple silicon

Viewed 177

I have a problem trying to run an application made in react-native which uses Flipper in apple silicon, I get the following error:

enter image description here

I tried some things like running Xcode in rosetta mode but it didn't work, I also tried some possible solutions mentioned in this issue, but none of the options worked.

for now, the only thing that has worked is to adjust the react-native.config.js file to prevent auto-linking for Flipper, like so:

module.exports = {
  dependencies: {
    'react-native-flipper': {
      platforms: {
        ios: null,
      },
    },
  },
  //... other react native configs
};

This option disables Flipper and what I need is to make it work, not to disable it.

2 Answers

Bump the FLIPPER_VERSION variable in android/gradle.properties. as

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.158.0

Then run cd android && ./gradlew clean && cd ..

It will integrate flipper on your project. By using this you need to install flipper to debug an app on your system and then install Sdk on the flipper app. then you can debug your app by using the flipper.

For further explanation, you can visit Here.

I hope this will help you.

Follow the below steps:

  1. Clean everything, use everything based on the M1 build, I mean Xcode, packages, libraries and etc. everything must be based on the M1 build form

  2. Initial an RN project, go to the ios folder, and run this command: arch -x86_64 pod install.

  3. It wouldn't affect your project development source and an Intel base macOS system or other platforms would be able to continue on this source.

Related