question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

library not found for -lAppAuth only for release build (works fine in debug)

See original GitHub issue

Issue

Hi,

I was using this library from long time. It is working fine for me till I was using React-Native 0.59.X As soon as i started using latest react-native 0.60.5 (latest for now) i am facing weird issue. In debug mode for iOS device is’ working fine as expected. But when i try to release the app from xcode. I am getting a linker error for AppAuth library.

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

My podfile as follows,

platform :ios, '11.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target '<AppName>' do
  # Pods for <AppName>
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # pod 'AppAuth', '>= 0.94'
  pod 'RNAppAuth', :path => '../node_modules/react-native-app-auth/ios/RNAppAuth.podspec'
  pod 'react-native-html-to-pdf', :path => '../node_modules/react-native-html-to-pdf'
  pod 'react-native-print', :path => '../node_modules/react-native-print'
  pod 'react-native-webview', :path=> '../node_modules/react-native-webview'
  pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
  pod 'RNDeviceInfo', :path=> '../node_modules/react-native-device-info'
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  pod 'react-native-signature-capture', :path => '../node_modules/react-native-signature-capture'

  target '<AppName>Tests' do
    inherit! :search_paths
    # Pods for testing
  end
   use_native_modules!
end

Also my Linked Binary with Libraries has only one item of libPod-<AppName>.a

Also added all configuration as told in getting started for AppDelegate.h & AppDelegate.m\


Environment

“react”: “16.8.6”, “react-native”: “0.60.5”, “react-native-app-auth”: “^4.4.0”,

Xcode : 10.3 Cocoa Pods: 1.7.5

  • Identity Provider: Okta
  • Platform experiencing the issue on: iOS
  • Using Expo?: No

Please help me to resolve the issue. Also let me know if you need any extra information. Thanks in advance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
tiffanym19commented, Jul 6, 2020

Im having this problem can someone help 😦

2reactions
Stas-Buzunkocommented, Jul 15, 2020

@tiffanym19 I faced this error when had to change platform :ios, from ‘10.0’ to ‘11.0’ didn’t use react-native-app-auth directly but likely used as peerDependency of google-signin

couldn’t fix this and had to rollback to platform :ios, ‘10.0’

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native xcode error | ld: library not found for -lAppAuth
Go to the project "Build Settings", find "Library Search Paths", and make sure $(inherited) is there. Per the above GitHub, you may need...
Read more >
ld: library not found for -lAppAuth : r/reactnative - Reddit
Was trying to build my RN project for iOS and having an error ld: library not found for -lAppAuth clang: error: linker command...
Read more >
[Solved]-React Native iOS release build linking problem
Coding example for the question React Native iOS release build linking problem. ... Native 0.63.2 iOS Build Error with `ld: library not found...
Read more >
Linker error when upgrading from React Native v0.59 to v0.63
Eventually, fix by fix, the time came to make a Release build to send to the ... not found for option '-L/Users/runner/Library/Developer/Xcode/DerivedData/ ...
Read more >
Active questions tagged react-native+ios - Stack Overflow
Previous React-native: How to build for ios from windows ... Localization is working fine with both languages. ... Next library not found for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found