构建CocoaPods项目时缺少标题

时间:2013-07-02 05:22:48

标签: ios xcode cocoapods

pod install NYXImagesKit到我的示例项目,它成功构建但在模拟器午餐后,Xcode出错: /XXX.m:17:9: 'NYXImagesKit.h' file not found

一切都很好,模拟器工作正常,唯一的问题是构建错误存在但没有链接错误,这很奇怪。

我在${PODS_HEADERS_SEARCH_PATHS}中定义了HEADER SEARCH PATH,pod.config如下:

ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS} $(SDKROOT)/usr/include/libxml2
OTHER_LDFLAGS = -ObjC -lxml2 -framework Accelerate -framework AssetsLibrary -framework CoreImage -framework ImageIO -framework MobileCoreServices -framework QuartzCore
PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/NYXImagesKit" "${PODS_ROOT}/BuildHeaders/hpple"
PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS}
PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/NYXImagesKit" "${PODS_ROOT}/Headers/hpple"
PODS_ROOT = ${SRCROOT}/Pods

1 个答案:

答案 0 :(得分:2)

如果模拟器显示出构建问题,我很惊讶。您可能想尝试从Product清除项目 - >在菜单栏中清洁。或者从管理器中删除派生数据。同时验证CocoaPods的最新版本为pod --version(现在为0.21.0),否则使用[sudo] gem update进行更新