How to get the device token from new xCode 8, Swift 3 in iOS 10?
Here is the code to register notification:
<
Faced the same problem, this is the only thing that helped me:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let token = String(format: "%@", deviceToken as CVarArg)
.trimmingCharacters(in: CharacterSet(charactersIn: "<>"))
.replacingOccurrences(of: " ", with: "")
}