Swift 3 - device tokens are now being parsed as '32BYTES'
I had the same problem. This is my solution:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { var token = "" for i in 0..<deviceToken.count { token = token + String(format: "%02.2hhx", arguments: [deviceToken[i]]) } print(token)}