skip to Main Content

I am trying to build a React Native app. I have already worked with other react native projects previously and haven’t faced any issues. This time, I am not able to run the app.

I created a new react-native project with:

npx react-native init demoproject

and ran it with:

cd demoproject
npx react-native start
npx react-native run-ios

In the terminal, I got this error:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening demoproject.xcworkspace. Run CLI with –verbose flag for more details.

When I tried running it with Xcode, I got this error:

Undefined symbols for architecture x86_64:
  "___darwin_check_fd_set_overflow", referenced from:
  _RAND_poll in libcrypto.a(rand_unix.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried these steps without any success.

react-native start --reset-cache
rm -rf node_modules/
rm -rf package-lock.json 
cd ios
pod deintegrate
cd ..
rm -rf ios/Podfile.lock 
npm install
npm audit fix
react-native link
cd ios
pod install
cd ..
react-native run-ios

Environments:

Xcode: 11.2 (11B52)
OS: mac OS Catalina 10.15.1
react-native-cli: 2.0.1
react-native: 0.62.2

I have a few other react-native projects that I tried and they run successfully. They also run on the same react-native version(0.62.2)

Is there anyway to solve the issue? Will updating Xcode to another version like 11.4 or 11.6 solve the problem?

3

Answers


  1. A temporarily workaround:

    1. Comment all flipper functions in podfile;
    2. Remove flipperInit in appDelegate.m;
    3. Run pod install inside ios folder;
    4. Clean project;
    5. Run project again.
    Login or Signup to reply.
  2. You have to remove Flipper Pod from file goto
    Your Project Folder->ios->Podfile and comment Flipper from that file as below

     #use_flipper!
     #post_install do |installer|
       #flipper_post_install(installer)
     #end
    

    Now from ios folder enter below command in terminal

     pod install
    

    It will fix this issue.

    Login or Signup to reply.
  3. I solved this issue with

    1.Comment all the below mentioned 4 flipper function lines in Podfile

    use_flipper!

    post_install do |installer|

    flipper_post_install(installer)

    end

    2.run pod install

    3.run the project.

    This resolved my issue.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search