Skip to content

linker command failed - ld: library not found for -lAppAuth #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brkrtp opened this issue Jun 17, 2018 · 21 comments
Closed

linker command failed - ld: library not found for -lAppAuth #118

brkrtp opened this issue Jun 17, 2018 · 21 comments

Comments

@brkrtp
Copy link

brkrtp commented Jun 17, 2018

screen shot 2018-06-17 at 16 11 00

screen shot 2018-06-17 at 16 11 05

ld: warning: directory not found for option '-L/Users/brkrtp/Library/Developer/Xcode/DerivedData/burak
-ceqbfdnxrzunipektpsftfekkcjw/Build/Products/Debug-iphoneos/AppAuth'
ld: library not found for -lAppAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@kadikraman
Copy link
Contributor

Have you run react-native link? If you have and you're still getting the error, try running the example app and compare its config to yours on Xcode.

@ButuzGOL
Copy link

same i just open Example from xcode and build it and this error
but if i do with react-native run-ios all good

@ButuzGOL
Copy link

Also i have notice this line

Include libAppAuth as a linked library for your target (in the "General -> Linked Framework and Libraries" section of your target).

but i cant find libAppAuth

@kadikraman
Copy link
Contributor

Hmm, I can't reproduce it. Which version of Xcode are you on?

@ButuzGOL
Copy link

Version 9.3
I did a lot of things but those might help
I did two things put

  1. Pods.xcodeproj in libraries
  2. did rm -rf ~/Library/Caches/CocoaPods
  3. pod install

@ButuzGOL
Copy link

And it helps but any way my ci still fails appcenter
logs_390.zip

@ButuzGOL
Copy link

you can try do git clone from scratch i think you should be able to reproduce

@ButuzGOL
Copy link

currently faced with dev pass but on archive fails with this error

@ButuzGOL
Copy link

ButuzGOL commented Jul 3, 2018

i think the problem with xcode version and pod
in latest xcode and lates pod all should be good but i will recheck it

@kadikraman
Copy link
Contributor

Hi, I've just released v3.0.0 of this library, which should fix some weirdness with iOS integration. Could you please try again with the latest version? Note that the code you need to add to AppDelegate has changed.

@Jonny993
Copy link

updates on this? same error!

@kadikraman
Copy link
Contributor

@Jonny993 have you run react-native link? What version of React Native and this library are you running?

@Jonny993
Copy link

Jonny993 commented Sep 13, 2018

image

react-native link done, all is working fine when I run the app in the IOS simulator, but problems comes up when I try to build with xcode!

"react-native": "0.56.0"
"react-native-app-auth": "^3.1.0"

Tell me if you need anything else

@kadikraman
Copy link
Contributor

@Jonny993 are you sure you've opened the.xcworkspace file (instead of the .xcodeproj which doesn't see pods)?

@Jonny993
Copy link

Jonny993 commented Sep 14, 2018

@Jonny993 are you sure you've opened the.xcworkspace file (instead of the .xcodeproj which doesn't see pods)?

If I try to open the workspace I don't have any command for build or anything like that.

However, digging more in the problem I found out that XCODE can't find lib named "AppAuth" in the project, so I went to the folder to see which libraries are builded

image

As I thought, no "AppAuth" lib is present, so I went in the build settings of the project, I searched for "Search Paths" and found out that for debugging and releasing the "Library Search Paths" was pointing to something "wrong" (AppAuth) so I changed the paths for pointing to the correct named lib but error is the same.

Here you can see

image

Any tip on this would be gold..

@Jonny993
Copy link

Jonny993 commented Sep 14, 2018

Ok so, huge update!
I reverted all the updates done yesterday and tried to do the following:

  • react-native run-ios

Got sured that everything was building and working fine on IOS Simulator

  • opened up .xcworkspace file instead of .xcodeproj one
  • this time, I could navigate the xcode project inside the workspace (I couldn't yesterday, don't know why, something was messing up the entire project)
  • added team and provisioning profile from target, general tab
  • added iOS Developer from project, Code Signing Identity to everything

image

  • build with CMD+R command the app directly on device
  • inserted password when prompted
  • done!

So just to clarify.. I was having some kind of problems accessing the .xcworkspace and so I tried to do the build on the .xcodeproj, which gave the errors above.
Cleaned everything up, restarting from yesterday, following the react native guide on how to build the app on device and boom, everything was working fine

@kadikraman
Copy link
Contributor

@Jonny993 awesome! 🎉

.xcworkspace vs .xcodeproj can be super confusing especially if you're new to xcode 😬 - but the rule of thumb in this case is that if you're using pods, you have to open .xcworkspace.

Closing this issue as although you weren't the original author of the issue, I get the feeling the solution is the same.

@chairmin
Copy link

@Jonny993 are you sure you've opened the.xcworkspace file (instead of the .xcodeproj which doesn't see pods)?

thanks

@vymallesh
Copy link

Hey,

I was facing same kind of issue with Microsoft Outlook login SDK integration.I was using Cocoapods to install the libraries.I am getting below error,

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

FYI : Podfile is : pod 'MSGraphSDK'
pod 'MSGraphSDK-NXOAuth2Adapter' and XCode version is 10.2.1

Any help would be appreciated !!
Thanks.

@lguardado
Copy link

Thank you @Jonny993! it worked for me too!

@felix-lambert
Copy link

I still get the same error. I tried everything. It has been a day I'm on this. Please can you help? The solution above did'nt help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants