Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tokorom/2587be90b91d148a6ce534517afa67c8 to your computer and use it in GitHub Desktop.
Save tokorom/2587be90b91d148a6ce534517afa67c8 to your computer and use it in GitHub Desktop.
Code to convert the data of a device token into a string, which was introduced in the WWDC20 session
let tokenComponents = token.map { data in String(format: "%02.2hhx", data) }
let deviceTokenString = tokenComponents.joined()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment