Alamofire Xcode 8 Swift 3导致786编译错误 [英] Alamofire Xcode 8 Swift 3 results in 786 compile errors

查看:111
本文介绍了Alamofire Xcode 8 Swift 3导致786编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 8.0 GM。我创建了一个默认的单视图应用程序,我的部署目标设置为9.0。

I am using the Xcode 8.0 GM. I created a default single-view app with my deployment target set to 9.0.

在我的Podfile中,我瞄准了Swift 3分支的最前沿:

In my Podfile I'm targeting the bleeding edge Swift 3 branch:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target 'MyProject' do
    pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift3'
end

我运行 pod install 并获得... 安装Alamofire(4.0.0-beta.2) ...太棒了,没问题。我打开 MyProject.xcworkspace

I run pod install and get ... Installing Alamofire (4.0.0-beta.2) ... fantastic, no problems. I open MyProject.xcworkspace.

弹出:

我之后无法点击,因为它告诉我:

I can't hit later because it tells me:


Xcode 8将无法构建目标Alamofire,并且在转换此目标中的Swift源代码之前,某些编辑功能将无法正常运行。

Xcode 8 will not be able to build the target "Alamofire", and certain editing features will not function properly until the Swift source code in this target has been converted.

这不好,我想建立它。所以我点击转换。它给了我选项:

That's no good, I want to build it. So I hit "Convert". It gives me options:

这就是我想要的,Swift 3。看起来不错,我点击下一步。

Well that's what I want, Swift 3. Looks good, I hit "next".

默认为这3个选定目标。好的,我点击下一步。

It defaults to these 3 selected targets. Ok fine, I hit next.


什么以上帝的圣名......

What in God's Holy name...

我想在Xcode 8上使用Alamofire的 swift3 前沿分支,Swift 3项目针对iOS 9.0。我哪里出错了,怎么才能让这个工作? FWIW我在尝试使用Alamofire的Swift 2.3分支时遇到了一堆错误,所以我知道这是我做错了。

I want to use Alamofire's swift3 bleeding edge branch on an Xcode 8, Swift 3 project targeting iOS 9.0. Where did I go wrong and how can I get this working? FWIW I get a bunch of errors trying to use Alamofire's Swift 2.3 branch so I know it's something I'm doing wrong.

推荐答案

通过以下命令升级到最新的Cocoapods(在此答案时:版本 1.1.0.beta.2 ):

Upgrading to the latest Cocoapods (at the time of this answer: version 1.1.0.beta.2) via the command:

gem install cocoapods --pre
似乎解决了我的情况。

gem install cocoapods --pre seemed to solve the issue for my circumstance.

这篇关于Alamofire Xcode 8 Swift 3导致786编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆