Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods can't find header xcode 6

I have a problem xcode can't find the headers of my pods in my wokspace.

The headers search path for the target seems ok

https://www.dropbox.com/s/ulqqai825a6xrg4/Screenshot%202014-09-29%2010.24.04.png?dl=1

Here is the content of my podfile

target "MyApp" do pod 'AFNetworking', '~> 2.0' pod 'Reachability' pod 'ViewDeck', '2.2.11' pod 'MBProgressHUD', '~> 0.8' end 

But when i build the project i have this error in the prefix.pch

/Users/...../MyApp-Prefix.pch:17:13: 'AFNetworking.h' file not found

I have tried to add platform :ios, "8.0" in my podfile and do a pod update but still no luck

I have also tried to add $(inherited) like suggested in the SO question : Xcode 6 doesn´t find cocoapods libraries

I'm using xcode 6 on mavericks

like image 456
Ptitaw Avatar asked Sep 29 '14 08:09

Ptitaw


2 Answers

I found solution. In your project properties replace this:

I FOUND SOLUTION

like image 183
Simón Urzúa Avatar answered Oct 05 '22 23:10

Simón Urzúa


You might also want to link your pods with both your targets like so:

platform :osx, '10.7'  link_with 'MyApp', 'MyApp Tests' pod 'AFNetworking', '~> 1.0' pod 'Objection', '0.9' 

From Cocoapods docs and this answer


Update: This no longer works for Cocoapods 1.0+, the correct way to implement the Podfile is:

platform :ios, '9.0' inhibit_all_warnings!  target 'MyApp' do   pod 'ObjectiveSugar', '~> 0.5'    target "MyAppTests" do     inherit! :search_paths     pod 'OCMock', '~> 2.0.1'   end end 

Source: https://guides.cocoapods.org/syntax/podfile.html#podfile

like image 28
jwswart Avatar answered Oct 05 '22 23:10

jwswart