skip to Main Content

I’ve Mac M2 chip. After my last weekend update of my Mac OS from Monterey to Sonoma (14.3) and upgrading the Xcode from 14.2 to Xcode 15.2, my react-native project code (0.72.4) build is failed, but after clearing node_modules, pods and reinstalling it worked.

Now i want create a new project for react native. I went to test by creating a new react native project using "npx react-native init ProjectName" with 0.73.5, my project is failed to build for ios. It throws

"❌ ld: library ‘CocoaAsyncSocket’ not found"

I tried doing all the below, but no use

  • Remove derive data

  • Delete build folder from ios

  • pod deintegrate && pod install

  • yarn cache clean

  • close the metro bundler and restart

  • Tried to build via command line and via Xcode, its all the same

  • I tried to link the CocoaAsyncSocket in Xcode.

Can anyone give me some clue about what’s going on. How to fix it?

2

Answers


  1. Chosen as BEST ANSWER

    Thanks for helping me out. Really appreciate your help. I tried that, but unfortunately it didn't help me out even i was trying to build via Xcode. But what i noticed was when i ran the command react-native run-ios, i could see my device name and the booted simulator name appear like side by side. And I think it messed up the xcode build. So what i did was if I mention the simulator name it worked, "react-native run-ios --simulator iPhone 15 Pro".

    Hope it helps someone out there.

    Thanks, BT


  2. Try oppening app-name.xcodeproj instead of app-name.xcworkspace in xCode and build your app.

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