Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CocoaPods generates invalid project file (header not found)

I have a project file with a Podfile that looks like this:

platform :ios, '7.0' 

def import_pods
pod 'Specta', '0.1.8' 
pod 'Expecta', '0.2.1' 
pod 'RestKit', '0.20.3' 
pod 'MagicalRecord', '2.1' 
pod 'RestKit/Testing', '0.20.3' 
end 

link_with 'LocalMedTests' 
import_pods

When I run pod install, it generates the Podfile.lock, Pods directory, and workspace for my project. When I open the workspace to build it, I get errors like this: 'RestKit.h' file not found.

It seems to only be an issue for RestKit but I can't get past those errors to see if there are more. The restkit headers are in Pods/Headers. They're properly included in Pods.xcconfig. Here it is for good measure:

FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks" 

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 

HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/Expecta" "${PODS_ROOT}/Headers/MagicalRecord" "${PODS_ROOT}/Headers/RestKit" "${PODS_ROOT}/Headers/RestKit/RestKit" "${PODS_ROOT}/Headers/RestKit/RestKit/CoreData" "${PODS_ROOT}/Headers/RestKit/RestKit/Network" "${PODS_ROOT}/Headers/RestKit/RestKit/ObjectMapping" "${PODS_ROOT}/Headers/RestKit/RestKit/Support" "${PODS_ROOT}/Headers/RestKit/RestKit/Testing" "${PODS_ROOT}/Headers/SOCKit" "${PODS_ROOT}/Headers/Specta" "${PODS_ROOT}/Headers/TransitionKit" 

OTHER_LDFLAGS = -ObjC -framework CFNetwork -framework CoreData -framework Foundation -framework MobileCoreServices -framework Security -framework SenTestingKit -framework SystemConfiguration 

PODS_ROOT = ${SRCROOT}/Pods

I've tried cleaning and cleaning the build folder. It doesn't matter - I always get the header not found error.

I should also add that all of the header directories specified by Pods.xcconfig are included in the target as they should be.

Any ideas about this? I've been using CocoaPods in this project for a couple of months with no issue, did something change recently?

like image 747
Evan Cordell Avatar asked Jul 19 '13 21:07

Evan Cordell


1 Answers

This solved my Problem

In HEADER_SEARCH_PATHS Under your Project Build Setting add the $(inherited)

Also DO this for all TAGETS

Change Arcgitectures to Standard armv7 enter image description here

https://stackoverflow.com/a/12142790/1294448

like image 190
Bishal Ghimire Avatar answered Oct 16 '22 10:10

Bishal Ghimire