Last active
November 23, 2018 20:04
-
-
Save scott-lydon/5fa35f36a19c53109454150d45225e9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This function is called when you successfully registered for remote notifs | |
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { | |
//This is one way we can convert the device token data into a String. | |
//apns stands for Apple Push Notification Services | |
let apnsDeviceToken = deviceToken.map {String(format: "%02.2hhx", $0)}.joined() | |
print(apnsDeviceToken) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment