How to get the device token from new xCode 8, Swift 3 in iOS 10?
Here is the code to register notification:
<
Swift 3 example taken from raywenderlich.com.
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data){
let tokenParts = deviceToken.map { data -> String in
return String(format: "%02.2hhx", data)
}
let token = tokenParts.joined()
print(token)
}