ios swift 打印Data
代码: func peripheralManager(_ peripheral: CBPeripheralManager, didReceiveWrite requests: [CBATTRequest]) { print(#function) if let data: Data = requests[0].value { print(data) print(NSData(data: data)) }