Cocoapods生成错误的xcconfig文件 - 没有标头搜索路径

时间:2015-06-10 14:27:03

标签: ios xcode swift header cocoapods

我遇到一个问题,在项目中找不到所有的库,我发现Pods.debug.xcconfig文件不包含标题搜索路径,所以可能是'是的原因,但我不知道为什么以及如何解决这个问题。 我的podfile如下所示:

platform :ios, '8.0'
use_frameworks!

target 'Project' do

   pod 'FBSDKCoreKit', '~> 4.2'
   pod 'FBSDKLoginKit', '~> 4.2'
   pod 'JSONHelper', '~> 1.6'

end

,xcconfig文件是这样的:

FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Bolts.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/FBSDKCoreKit.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/FBSDKLoginKit.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/JSONHelper.framework/Headers"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Bolts" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "JSONHelper"
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Project
PODS_ROOT = ${SRCROOT}/Pods

我正在使用Xcode 6.3.2和swift。

1 个答案:

答案 0 :(得分:0)

找出由此行引起的问题:use_frameworks! 因为我想要包含用swift编写的JSONHelper。

删除它并手动添加JSONHelper解决了这个问题。