不能在swift中转换AnyHashable 3
我有下面的方法,写在迅速(之前swift 3)。 下面是方法
func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [AnyHashable: Any]) -> Void { Branch.getInstance().handlePushNotification(launchOptions) }
它给出了Use of undeclared type AnyHashable
错误。 我怎么能把这个转化为迅速3.我试着跟着。
func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [NSObject : AnyObject]) -> Void { Branch.getInstance().handlePushNotification(launchOptions) }
它消除了错误,但不知道它的行为是一样的。 希望你的帮助。 thanx提前。
types转换
喜欢
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { print("received a notification") Branch.getInstance().handlePushNotification(launchOptions) }
获取更多的信息,你可以从分支在Git中获得