Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: library not found for -lPods

Having a react-native project, which won't build on target "Staging" since I've setup cocoapods and using xcworkspace file since then (needed for firebase integration of react-native-firebase). When trying to build for taget "staging", I'll get this error:

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

enter image description here

It works on debug, and (well at least it doesn't throw an error) when I archive the project.

I've having a "staging" target because of code-push. Using react-native at version 0.48.4 and Xcode 9 (created it following this guide, but before using cocoapods)

My podfile:

platform :ios, '9.0'

target 'xx' do
  #use_frameworks!

  # Pods 
  pod 'Firebase/Core'
  pod 'Firebase/Analytics'
  pod 'Firebase/Database'
  pod 'Firebase/Messaging'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'

end

Tried with and without use_frameworks!, cleaning project, deleted DerivedData, deintegrating and reintegrating pods.

What could cause this? (Please tell me if you need more information)

like image 873
Dennis Avatar asked Jan 12 '18 14:01

Dennis


1 Answers

What worked for me:

  1. Deintegrated all pods using pod deintegrate (using enter link description here)
  2. pod install
  3. Removed [Project name] > Frameworks > Pods_[Project name].framework (which was red, but there are actually more files being red)
  4. Build succeeded

Was doing this with the help of this post. Thanks also to Maurice for trying to help me.

like image 137
Dennis Avatar answered Oct 06 '22 21:10

Dennis