
在升级之前,我已经将我的Xcode更新到了Xcode 8.1,它工作得很好,但在升级之后,我已经将swift 2.3转换到了swift 3.0,并添加了更新的alamofire库。但是在Alamofire的request.swift文件中给出了错误。
发布于 2016-11-15 22:29:54
我找到了。
Request.swift >>
NotificationCenter.default.post(
//name: Notification.Name.Task.DidSuspend,
name: Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend"),
object: self,
//userInfo: [Notification.Keys.Tasks: task]
userInfo: ["org.alamofire.notification.key.task": task]
)
NotificationCenter.default.post(
//name: Notification.Name.Task.DidCancel,
name: Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel"),
object: self,
//userInfo: [Notification.Keys.Tasks: task]
userInfo: ["org.alamofire.notification.key.task": task]
)SessionDelegate.swift >>
NotificationCenter.default.post(
//name: Notification.Name.Task.DidComplete,
name: Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete"),
object: strongSelf,
//userInfo: [Notification.Keys.Tasks: task]
userInfo: ["org.alamofire.notification.key.task": task]
)编辑另一个相同的代码。可能是4~5个函数。
祝好运
发布于 2016-11-14 20:31:04
在我的例子中,我使用了'import Alamofire‘。注释导入,构建,然后取消对导入的注释。然后重试编译。
https://stackoverflow.com/questions/40483990
复制相似问题