I have Objective-C method
- (void)updateRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
I was calling successfully in swift 2.3
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
Moxtra.sharedClient().updateRemoteNotificationsWithDeviceTokens(deviceToken)
}
but in swift 3 method change (from NSdata to data)
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Moxtra.sharedClient().updateRemoteNotifications(withDeviceToken: deviceToken)
}
But swift 3 device token of Data type return -> 32 bytes and swift 2.3 device token of NSdata type was return - token string - fffeaa1e 5aaaba7d a0e75e33 c139839f 6c906ae5 2b20f834 5a290c3d 20dc447c
so in swift 3 I am not able to pass deviceToken to server
is there any way to pass expected device token of parameter type "Data" in swift 3?
what is diff between both swift 2.3 and swift 3 methods in details
Swift 2.3 -
Moxtra.sharedClient().updateRemoteNotificationsWithDeviceTokens(fffeaa1e 5aaaba7d a0e75e33 c139839f 6c906ae5 2b20f834 5a290c3d 20dc447c)
swift 3
Moxtra.sharedClient().updateRemoteNotifications(withDeviceToken: 32)