1

I have written a method for parsing Receipt of InAppPurchase in Swift2.3 and now I am converting it to Swift3. So I am getting this error. Anyone has idea, how to fix this?

Receipt Parsing Error in Swift 3

Umair Aamir
  • 1,624
  • 16
  • 26

1 Answers1

0

Try like this,

var p: UnsafePointer<UInt8>? = (data as NSData).bytes.bindMemory(to: UInt8.self, capacity: data.count)
Venk
  • 5,949
  • 9
  • 41
  • 52
  • I have done like this and it worked for me var p = (data as NSData).bytes.bindMemory(to: UInt8.self, capacity: data.count) as UnsafePointer? – Umair Aamir Dec 01 '16 at 13:19