Ios 无法转换swift 3中的任何哈希值

Ios 无法转换swift 3中的任何哈希值,ios,swift3,branch.io,Ios,Swift3,Branch.io,我有下面的方法,它是用swift写的(在swift 3之前)。下面是方法 func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [AnyHashable: Any]) -> Void { Branch.getInstance().handlePushNotification(launchOptions) } 它给出了使用未声明类型AnyHashable的错误

我有下面的方法,它是用swift写的(在swift 3之前)。下面是方法

func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [AnyHashable: Any]) -> Void {
    Branch.getInstance().handlePushNotification(launchOptions)
}
它给出了
使用未声明类型AnyHashable的错误。我怎样才能把这个秘密告诉斯威夫特3。我试着跟随

 func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [NSObject : AnyObject]) -> Void {
        Branch.getInstance().handlePushNotification(launchOptions)
    }

它删除了错误,但不知道它的行为方式是相同的。希望你能帮上忙。thanx提前。类型转换

喜欢

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
print("received a notification")
   Branch.getInstance().handlePushNotification(launchOptions)

}

有关更多信息,请参见显示您的handlePushNotification代码