Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cocoapods - ld: framework not found Pods

I've been trying to install a pod called SabBar using cocoapods, I've successfully install cocoapods along with the initial setup. But for some reason I'm getting this error during compile time:

ld: warning: directory not found for option '-F/Users/Andy/Library/Developer/Xcode/DerivedData/JymJam-gocrzdctroqhlaedmghajkejcugm/Build/Products/Debug-iphonesimulator/SabBar'

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

I've looked at other solutions but they don't seem to work for me.

This is what my Podfile looks like:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target "JymJam" do
    pod 'SabBar'
end

I've tried removing "use_frameworks!" but this doesn't work as my project is swift based.

like image 584
Speedpoint Avatar asked Sep 09 '16 15:09

Speedpoint


People also ask

How do I add pods dependencies?

You can add dependencies on subspecs. Specify the minimum deployment target version for the Pod library. Re-import the project.

What is use frameworks in CocoaPods?

use_frameworks! tells cocoa pods to use dynamic libraries, and was very prevalent at one point due in particular to swift not supporting static libraries, meaning there was no choice - however you often don't need use_frameworks! anymore. As of Xcode 9 beta 4, and CocoaPods 1.5.


3 Answers

I fixed this issue by using the following two steps:

Firstly go to the project path in terminal then apply the following steps

1 : pod deintegrate

2 : pod install

like image 110
IKKA Avatar answered Sep 24 '22 07:09

IKKA


use_frameworks! is only needed if the Pod has to be imported as a dynamic framework.

There are several possibilities:

  1. You didn't use the generated xcworkspace file.
  2. the target name is wrong
  3. You didn't use the xcconfig files generated by cocoapods
like image 32
Oliver Hu Avatar answered Sep 23 '22 07:09

Oliver Hu


I just deleted libPod.a from Target-Build phases and it worked.

like image 41
Venu Gopal Tewari Avatar answered Sep 20 '22 07:09

Venu Gopal Tewari