安装pod后,Xcode 8 swift pod标头为空

时间:2016-06-24 19:36:21

标签: xcode swift cocoa

我正在尝试编译一个用swift编写的现有xcode项目。该项目使用Alamofire。我安装了xcode 8 beta并打开了项目。我知道Alamofire有很多错误需要更新到版本3.2.1。

我编辑了我的Podfile并修复了版本号,然后运行pod update alamofire。每个pod都更新了,而不仅仅是更新Alomfire。这显然是一个错误。

Podfile包含指令use_frameworks!更新pod后,pods / headers目录完全为空,没有Public或Private目录,项目无法构建,缺少356个文件错误。

根据此处https://github.com/CocoaPods/CocoaPods/issues/4605#issuecomment-208822149的建议,将ALWAYS_SEARCH_USER_PATHS的构建搜索设置更改为否(或是),然后删除窗格并再次运行pod安装。

stackoverflow上有很多不同的问题,问同一个问题而没有答案。这是我能找到的列表。

Pods/Headers empty after pod install

Empty Pod Headers Folder after `pod install`

After pod install Public folder is empty

来自Pods-Myproject.debug.xconfig

EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Bolts-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/CocoaLumberjack" "$PODS_CONFIGURATION_BUILD_DIR/DBAlertController-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatterValueTransformer" "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD" "$PODS_CONFIGURATION_BUILD_DIR/RESideMenu-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/RKValueTransformers" "$PODS_CONFIGURATION_BUILD_DIR/RestKit" "$PODS_CONFIGURATION_BUILD_DIR/SOCKit" "$PODS_CONFIGURATION_BUILD_DIR/TransitionKit" "$PODS_CONFIGURATION_BUILD_DIR/iCarousel-iOS8.0" "${PODS_ROOT}/Crashlytics/iOS" "${PODS_ROOT}/Fabric/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking/AFNetworking.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Bolts-iOS8.0/Bolts.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CocoaLumberjack/CocoaLumberjack.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/DBAlertController-iOS8.0/DBAlertController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit-iOS8.0/FBSDKCoreKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit-iOS8.0/FBSDKLoginKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatterValueTransformer/ISO8601DateFormatterValueTransformer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD/MBProgressHUD.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RESideMenu-iOS8.0/RESideMenu.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RKValueTransformers/RKValueTransformers.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RestKit/RestKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SOCKit/SOCKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TransitionKit/TransitionKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/iCarousel-iOS8.0/iCarousel.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Crashlytics" -isystem "${PODS_ROOT}/Headers/Public/Fabric"
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "AFNetworking" -framework "Alamofire" -framework "Bolts" -framework "CocoaLumberjack" -framework "Crashlytics" -framework "DBAlertController" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "Fabric" -framework "ISO8601DateFormatterValueTransformer" -framework "MBProgressHUD" -framework "RESideMenu" -framework "RKValueTransformers" -framework "RestKit" -framework "SOCKit" -framework "Security" -framework "SystemConfiguration" -framework "TransitionKit" -framework "UIKit" -framework "iCarousel"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}/Pods

我真的需要找到解决这个问题的方法,所以如果有人能回答这个问题,我将不胜感激。

2 个答案:

答案 0 :(得分:2)

git add -A,然后是Product - >清除了除Alamofire之外的所有错误。

答案 1 :(得分:0)

如果要更新特定POD,请按Docs中的说明运行pod update PODNAME。我建议您删除所有广告连播并使用最新版本的pod install运行Alamofire