I have tried to run the below code in swift 3
var values = [UInt8](count:data!.length, repeatedValue:0)
data!.getBytes(&values, length:data!.length)
where data is 'Data' datatype (NSData is change to 'Data' as per swift 3 guidelines)
I am not able to run the above code in Swift 3. Compiler gives error that "Argument Repeated value must precede argument". The same line of code was working in Swift 2.2
What will be the solution ?
For Swift3 just use following:
let array = [UInt8](yourDataObject)
That's all, folks!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With