3

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.

Cristian Flórez
  • 2,277
  • 5
  • 29
  • 51
  • I have a problem with this approach, some team members have computers with M1 processors and others with Intel, if I make this change would it still work for both? – Cristian Flórez Aug 25 '22 at 20:24

3 Answers3

1

I am using flipper universal builds from here:

https://github.com/chiragramani/FlipperReleases/releases

As a note, I am using this for quite some time and once the new version gets out you might need to wait for 2-3 days until it generates a new universal build there. If you don't want to wait then you can clone the repo and run the script file and it will generate a new build instantly.

For more details you all can check this thread: https://github.com/facebook/flipper/pull/3553

Umang Loriya
  • 840
  • 8
  • 15
-1

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.

Talha Akbar
  • 462
  • 3
  • 15
  • Did u mean 0.58.0 version is supported for apple silicon? I think this does not shed any light on the problem mentioned. – Cristian Flórez Aug 16 '22 at 20:03
  • No! I was not saying this. If you see I recommend using the 0.158.0 version, And when you run that given command that automatically links all files and created a file of "ReactNativeFilter.java". By using this you can setup flipper on your project. – Talha Akbar Aug 17 '22 at 04:38
  • I did some tests and the proposed solution does not work. – Cristian Flórez Sep 01 '22 at 20:40
-1

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.

AmerllicA
  • 29,059
  • 15
  • 130
  • 154
  • When u say "clean everything" do you mean remove pods and re-install them? or you can post a step-by-step of what you call cleaning? I removed the pods and then did step 2 and it didn't work, it keeps throwing the same error. – Cristian Flórez Aug 28 '22 at 17:30
  • Exactly, clean the latest builds, pod files and etc. – AmerllicA Aug 28 '22 at 19:53
  • I followed the steps indicated in the answer and I still get the same result, error due to the architecture. – Cristian Flórez Aug 29 '22 at 18:14