导入Alamofire.swift不起作用

时间:2014-12-18 14:16:22

标签: swift alamofire

我正在尝试将alamofire添加到我的项目中,但我遇到了一个问题。

一旦我将文件添加到我的项目中,我无法编译,我得到的错误是:

Alamofire.swift:106:26: 'Method' cannot be constructed because it has no accessible initializers
Alamofire.swift:156:130: 'CFStringBuiltInEncodings' does not have a member named 'rawValue'
Alamofire.swift:245:61: Bound value in a conditional binding must be of Optional type
Alamofire.swift:1290:90: Operand of postfix '?' should have optional type; type is 'NSString'
Alamofire.swift:1453:82: Operand of postfix '!' should have optional type; type is 'NSURL'

1 个答案:

答案 0 :(得分:2)

您可能正在使用旧版本的Alamofire或旧版本的Xcode。确保您更新到最新版本(HEAD of master,或1.1.2 for Alamofire和Xcode 6.1.1或6.2.0 Beta 2)