Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native 0.63.2 iOS Build Error with `ld: library not found for -lAppAuth`

I was trying to build my RN project for iOS and having an error

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

Do you have any ideas on how to solve this? I also tried to open .xcworkspace file but I am not sure if my xcode is opening the correct file. How do you tell if the xcode is opening xcworkspace or xcodeproj file?

I am on Mac Catalina with XCode 11.4.1. RN 0.63.2.

-- Updated --

I found out that there is an extra -L in front of -L....AppAuth as following. Is this bug related to this?

- L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator -L -L/Users/aungmt/Library/Developer/Xcode/DerivedData/myanlearn_for_students-asipdyxbdtsgxofrgmvaagrgceyh/Build/Products/Debug-iphonesimulator/AppAuth
like image 784
Aung Myint Thein Avatar asked Jul 28 '20 14:07

Aung Myint Thein


1 Answers

Got exactly the same error.

  1. Go to Project Build Settings
  2. Find "Search Paths"
  3. Remove $(inherited) from "Library Search Paths"

enter image description here

like image 154
ezik Avatar answered Sep 17 '22 13:09

ezik