Ios Alamofire Library的request.swift文件中出现错误-“;“任务”的模糊用法;更新到xcode 8.1后

Ios Alamofire Library的request.swift文件中出现错误-“;“任务”的模糊用法;更新到xcode 8.1后,ios,objective-c,xcode,swift3,alamofire,Ios,Objective C,Xcode,Swift3,Alamofire,在升级之前,我已经将我的Xcode更新为Xcode 8.1,它工作正常,但升级之后,我将swift 2.3转换为swift 3.0,并添加了更新的alamofire库。但它在Alamofire的request.swift文件中给出了错误。在我的例子中,我使用了“导入Alamofire”。注释导入、生成,然后取消对导入的注释。然后重试编译。我找到了它 Request.swift>> NotificationCenter.default.post( //name: Notif


在升级之前,我已经将我的Xcode更新为Xcode 8.1,它工作正常,但升级之后,我将swift 2.3转换为swift 3.0,并添加了更新的alamofire库。但它在Alamofire的
request.swift
文件中给出了错误。

在我的例子中,我使用了“导入Alamofire”。注释导入、生成,然后取消对导入的注释。然后重试编译。

我找到了它

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个功能


祝你好运

你应该将alamofire更新到最新版本我已将alamofire更新到最新的4.0版,但它不起作用是的,对我来说,这个技巧也起作用了,但我还必须对alamofire代码进行注释,然后取消注释。(因为它必须成功编译)。对我来说,问题开始于我第二天关闭并打开项目。有人告诉我为什么会这样吗?