Created
February 28, 2019 20:36
-
-
Save apple-avadhesh/1b272bf2fb52079e8b36e3178eeca1fc to your computer and use it in GitHub Desktop.
Device Token- Data Extension Swift 4.2
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
extension Data { | |
public func apnsToken() -> String { | |
var token: String = "" | |
for i in 0 ..< self.count { | |
token += String(format: "%02.2hhx", self[i] as CVarArg) | |
} | |
return token | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment