Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CocoaPods not importing SDK frameworks properly

I have been trying to import the Dropbox-iOS-SDK into my project through CocoaPods, but the framework file doesn't seem to be imported properly. My Podfile looks like this:

platform :ios, '7.0'

pod "AFNetworking", "~> 2.0"
pod 'Reachability'
pod 'Facebook-iOS-SDK', '~> 3.9'
pod "Dropbox-iOS-SDK"

I am new to CocoaPods and I'm not sure where I am going wrong. I tried cleaning the project and restarting Xcode. But the Pods Frameworks file still looks like this:

enter image description here

As a result of this I am getting the following errors during build:

enter image description here

Any idea how I can fix this?

like image 812
Rameez Hussain Avatar asked Dec 06 '13 21:12

Rameez Hussain


People also ask

Are CocoaPods static or dynamic?

By default, CocoaPods (no mention of use_frameworks! ) will build and link all the dependencies as static libraries. If we add use_frameworks! to our Podfile, CP will instead build and link the dependencies as dynamic frameworks.


2 Answers

I was adding cocoa pods to an existing project and so I had to remove references to all paths to previously imported frameworks and headers. Once I removed these, everything worked fine.

This is in case someone runs into the same problem.

like image 60
Rameez Hussain Avatar answered Sep 25 '22 14:09

Rameez Hussain


Same response as Rameez with more precision : As I had previously added libraries without Cocoapod, my project settings were not clean. When running pod install, the "Framework search path" and "header search path" were not set correctly.

To get the correct value for those two search path :

  1. create an empty project
  2. add the previous podfile in the new project (just change the target name)
  3. run pod install
  4. Look at the Framework and header search path values in the new project
  5. Copy-paste those values into your previous project settings
like image 45
CedricSoubrie Avatar answered Sep 23 '22 14:09

CedricSoubrie