0

我正在尝试将 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'
4

1 回答 1

2

看来您正在使用旧版本的 Alamofire 或旧版本的 Xcode。确保您已更新到两者中的最新版本(master 的 HEAD,或 Alamofire 的 1.1.2 和 Xcode 6.1.1 或 6.2.0 Beta 2)

于 2014-12-18T17:15:44.947 回答