打印deviceToken-oc-swift-推送

swift

1
2
3
4
5
6
7
public func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
{
let device = NSData(data: deviceToken)
let deviceId = device.description.replacingOccurrences(of:"<", with:"").replacingOccurrences(of:">", with:"").replacingOccurrences(of:" ", with:"")
print("-----deviceToken:\(deviceId)")
JPUSHService.registerDeviceToken(deviceToken)
}

OC

1
NSLog(@"DeviceToken: {%@}",deviceToken);