I am using this code to get the Notification Center Device token.
It was working in Swift 3 but not working in Swift 4. What changed?
if #available(iOS 1
You can use like,
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { let hexString = deviceToken.map { String(format: "%02.2hhx", $0) }.joined() print(hexString) }