Skip to content

Instantly share code, notes, and snippets.

@pgpt10
Created May 29, 2018 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgpt10/3b803e80d2798103c13e11d6c92dae2c to your computer and use it in GitHub Desktop.
Save pgpt10/3b803e80d2798103c13e11d6c92dae2c to your computer and use it in GitHub Desktop.
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("Device Token: \(token)")
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)
{
print(error.localizedDescription)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment