Created
March 10, 2018 16:00
-
-
Save khanlou/8e9f9615dd0199946d011e32341942c3 to your computer and use it in GitHub Desktop.
How to generate a hex string for push notifications
This file contains hidden or 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
import Foundation | |
extension Data { | |
var hexString: String { | |
return self.map({ return String(format: "%02hhx", $0) }).joined() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment