Xcode 8 swift pod头在pod安装后为空

时间:2023-01-17 23:34:38

I am trying to compile an existing xcode project written in swift. The project uses Alamofire. I installed xcode 8 beta and opened the project. There were many errors with Alamofire which I learned need to be updated to version 3.2.1.

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

I edited my Podfile and fixed the version number then ran pod update alamofire. Instead of only updating Alomfire, every pod was updated. This is apparently a bug.

我编辑了我的Podfile并修正了版本号,然后运行pod更新alamofire。不是只更新Alomfire,而是更新每个pod。这显然是一个bug。

The Podfile contains the directive use_frameworks! After updating the pods, the pods/headers directory was completely empty, without either Public or Private directories and the project failed to build with 356 missing file errors.

Podfile包含了指令use_framework !在更新了pods之后,pods/header目录完全为空,没有公共或私有目录,项目构建失败,丢失了356个文件错误。

Changing the build search settings for ALWAYS_SEARCH_USER_PATHS to no (or yes) in accordance with a recommendation here https://github.com/CocoaPods/CocoaPods/issues/4605#issuecomment-208822149 then deleting the pods and running pod install again did nothing.

根据这里的建议,将ALWAYS_SEARCH_USER_PATHS的构建搜索设置更改为no(或yes),然后删除pods并再次运行pod安装没有任何作用。

There are a number of different questions on * asking the same question with no answers. Here is a list of the ones I can find.

*上有很多不同的问题,都是问同一个问题,没有答案。这是我能找到的名单。

Pods/Headers empty after pod install

pod / header在pod安装后清空。

Empty Pod Headers Folder after `pod install`

“Pod安装”后空Pod header文件夹

After pod install Public folder is empty

pod安装后,公共文件夹为空

From Pods-Myproject.debug.xconfig

从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

I really need to find a solution to this problem so I would be grateful if anybody can answer this question.

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

2 个解决方案

#1


2  

git add -A followed by Product -> Clean removed all errors except Alamofire.

git添加- a,然后是产品->清除了除Alamofire之外的所有错误。

#2


0  

When you want to update a particular POD, you run pod update PODNAME as given in the Docs. I suggest you delete all the pods and run pod install with the latest version of Alamofire.

当您想要更新特定的POD时,您可以运行POD更新PODNAME,如文档中所示。我建议您删除所有的豆荚并运行pod安装与最新版本的Alamofire。

#1


2  

git add -A followed by Product -> Clean removed all errors except Alamofire.

git添加- a,然后是产品->清除了除Alamofire之外的所有错误。

#2


0  

When you want to update a particular POD, you run pod update PODNAME as given in the Docs. I suggest you delete all the pods and run pod install with the latest version of Alamofire.

当您想要更新特定的POD时,您可以运行POD更新PODNAME,如文档中所示。我建议您删除所有的豆荚并运行pod安装与最新版本的Alamofire。