Umair Aamir Umair Aamir - 1 year ago 168
iOS Question

Cannot pass immutable value as inout argument: implicit conversion from 'UnsafePointer<UInt8>? to 'UnsafePointer<UInt8>?' require a temporary

I have written a method for parsing Receipt of

and now I am converting it to
. So I am getting this error. Anyone has idea, how to fix this?

Receipt Parsing Error in Swift 3

Answer Source

Try like this,

var p: UnsafePointer<UInt8>? = (data as NSData).bytes.bindMemory(to: UInt8.self, capacity: data.count)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download