CocoaPods生成无效的项目文件(未找到标题) [英] CocoaPods generates invalid project file (header not found)

查看:379
本文介绍了CocoaPods生成无效的项目文件(未找到标题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有Podfile的项目文件,如下所示:

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

当我运行pod install时,它会为我的项目生成Podfile.lock,Pods目录和工作空间。当我打开工作区来构建它时,我得到这样的错误:找不到'RestKit.h'文件。

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.

这似乎只是RestKit的一个问题,但我无法通过这些错误,看看是否还有更多。 restkit标头位于Pods / Headers中。它们被正确地包含在Pods.xcconfig中。这是一个很好的衡量标准:

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.

我还应该补充说,Pods.xcconfig指定的所有头目录都包含在目标中应该如此。

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

有关于此的任何想法?我一直在这个项目中使用CocoaPods几个月没有问题,最近发生了什么变化?

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

推荐答案

这解决了我的问题

HEADER_SEARCH_PATHS 在您的项目构建设置下添加 $(继承)

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

也为所有TAGETS做这个

Also DO this for all TAGETS

将Arcgitectures更改为标准armv7

Change Arcgitectures to Standard armv7

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

这篇关于CocoaPods生成无效的项目文件(未找到标题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆