我遇到了一个问题,即项目中未找到所有库,而且我发现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。
最佳答案
找出导致此行的问题:use_frameworks!
因为我想包含以迅捷方式编写的JSONHelper。
删除它并手动添加了JSONHelper即可解决问题。