1

I have been trying to deal with a lot of problems since I upgraded the react-native version of my app. One of those was this that came out of nowhere!

ld: warning: directory not found for option '-F~/Documents/FacebookSDK'

Followed by these (which caused extra confusion)

ld: library not found for -lRCTWebSocket clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I solve this?

honor
  • 7,378
  • 10
  • 48
  • 76

1 Answers1

1

I did some googling and used some tips trying to solve it. Most of them did not work. So I decided I should share the solution that worked for me.

Quote from another SO discussion:

if your error includes the -L flag, then delete the values in Library Search Paths if your error includes the -F flag, then delete the values in Framework Search Paths

I checked the framework search path values under Build Settings It was like this:

enter image description here

For both Release and Debug configurations. I deleted the line for FacebookSDK (line 3) from both release and debug configurations, and did another react-native run-ios. And it worked!

I hope this helps...

honor
  • 7,378
  • 10
  • 48
  • 76