Xcode - ld: library not found for -lPods

后端 未结 22 1467
爱一瞬间的悲伤
爱一瞬间的悲伤 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: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!

提交回复
热议问题