I couldn\'t find a solution to this problem in Swift (all of them are Objective-C, and they deal with pointers which I don\'t think exist in Swift in the same form). Is ther
Swift 3/4
let data = Data(bytes: [0x01, 0x02, 0x03]) let byteArray: [UInt8] = data.map { $0 }