7
votes

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.

4
Is is your cocoapods up to date? And was your xcode project closed when you tried installing the xcode? better yet, quit Xcode while installing this cocoapod.Yash Tamakuwala
May be removing podfile from your project and install again would be better. stackoverflow.com/questions/16427421/…alitosuner
Long time ago i investigated very much on this. I wrote a whole blog on it. Maybe this will help you. kandelvijaya.com/?p=152kandelvijaya
are you using the xcworkspace?Dev Sanghani
Did you find a solution for this?William Grand

4 Answers

7
votes

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

4
votes

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
1
votes

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

0
votes

First close workspace Second clean derived data (~/Library/Developer/Xcode/DerivedData/)

First put this line in Podfile, after this line config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

pod 'CocoaAsyncSocket' <— put it after above line

Then run below command in terminal pod deintegrate rm Podfile.lock

Then manually delete workspace of project

After that go to iOS folder

And run below command Pod install

You can see after pod install command , Podfile.lock and workspace generated automatically.

Then open workspace and clean project and build again then you get a new error of “multiple command produces derived data” so, for that go to  Build phases > Copy Bundle Resources and remove info.plist and fonts ttf file from there.

Notes: workspace must be “New build system,”..

Then build the project..

It works very fine.