DeviceToken Data -> String

let nsdataStr = NSData.init(data: deviceToken)

let datastr = nsdataStr.description.replacingOccurrences(of: "<", with: "").replacingOccurrences(of: ">", with: "").replacingOccurrences(of: " ", with: “")

print("deviceToken:\(datastr)")

你可能感兴趣的:(DeviceToken Data -> String)