react-native clang: error: linker command failed with exit code 1

Viewed 8685

I am trying to build my react-native project in Xcode to release in App Store but the build fails with the error

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am not sure how to proceed. I have facebook sdk and react-native-firebase in my project. Can you please help me what could be wrong. Thanks.

2 Answers
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This error mostly occur when node modules aren't correctly installed in the react-native-ios. Better check if the pods are installed correctly or the .xcodeproj are included and correctly linked with project.

react-native link

react-native link doesn't correctly link all the packages. So recheck it and it manually or using cocoapods.

If further information from the pod are shared, I can help you to find the correct module.

You can solve this error by doing some changes in Xcode app info.

  1. Open Xcode in application
  2. Right click and open on Get info
  3. you will find three option there, check on Open using Rosetta.
  4. Now close the Xcode completely, and then open. Now you are able to make build successfully.
Related