Xcode - ld: library not found for -lPods

后端 未结 22 1406
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 18:27

I get these errors when I try to build an iOS application.

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to s         


        
相关标签:
22条回答
  • 2020-11-28 18:50

    This was my issue while trying to integrate Firebase to my Xcode project using cocoapods

    library not found for -lGoogleToolboxForMac
    linker command failed with exit code 1 (use -v to see invocation)
    

    After hours of searching and trying out various fixes listed in the stackoverflow, my issue was finally fixed doing following steps

    1. Go to Build Settings, search for Other Linker Flags, remove all values expect $(inherited)

    Do this for all targets.

    1. Delete the pods folder. (ios/Pods)
    2. Do pod update

    Voila! All linker errors will be gone.

    0 讨论(0)
  • 2020-11-28 18:51

    When you clone project from somewhere which uses Cocoapods you need to install them to your project.

    Here step-by-step what you need to do:

    • 1) clone source code to local machine;
    • 2) close the xcode project (if open);
    • 3) install cocoapods application on your mac by running this command in terminal: "gem install cocoapods", add "sudo " in the beginning if did not work;
    • 4) go to the root of your xcode project by using "cd" command in terminal;
    • 5) you should have Podfile in this folder; if you want to double check it use: "cat Podfile" command, it will display the content of this file with Libraries that will have to be installed to your project;
    • 6) then use "pod install" command to download and install the Libraries to your project; the Podfile.lock will be created and {Your project name}.xcworkspace file;
    • 7) from now on you have to use {Your project name}.xcworkspace to open it in xcode;

    Good luck!

    0 讨论(0)
  • 2020-11-28 18:52

    If anyone came here to resolve an error with react-native-fbsdk after installing it using Cocoapods, keep in mind that you have to remove all the other .a files in your Projects build phases and only keep the .a from cocoapods called libPods-WhateverAppName.a.

    This is usually caused from running rnpm link and the way rnpm works.

    After I removed the facebook core .a file from my build phases my project was up and running once again.

    0 讨论(0)
  • 2020-11-28 18:54

    Had a same issue after upgrading Deployment target from 7.0 to 8.0 and enabling use_frameworks!

    cocoapods did not delete previously generated PodName.a files from the Frameworks section of my project.

    So I had to delete those manually, because they caused the linker error

    0 讨论(0)
  • 2020-11-28 18:56

    For me this is worked. I have changed my app name from someApp to otherApp. And I am using cocoa pods for multiple third party services integration. So Because of that 2 libPod files added(As I have changed name and target of app). Finally I had to remove one libPod. And it worked.

    target-> Build phases-> Link Binary With Libraries

    0 讨论(0)
  • 2020-11-28 18:59

    It seems project has been using cocoapods. and that files are missing from your project.

    You cant just download it from git. You need to install it from cocoapods.

    for more help, you may follow Introduction to CocoaPods Tutorial

    If the project uses CocoaPods be aware to always open the .xcworkspace file instead of the .xcodeproj file

    0 讨论(0)
提交回复
热议问题