I am receiving iPhone device token in the form of NSData object.
When I tested my notifications script function, I have only copied that object from log and th
If anyone is looking for a way to do this in Swift:
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
let tokenChars = UnsafePointer(deviceToken.bytes)
var tokenString = ""
for i in 0..
Swift 3 introduces the Data type, with value semantics. To convert the deviceToken to a String, you can do as follows:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
var token: String = ""
for i in 0..