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?
Asked
Active
Viewed 657 times
1

Umair Aamir
- 1,624
- 16
- 26
-
can you add some more code ? like how you r declaring 'p' ? – Venk Dec 01 '16 at 11:52
-
var p = (data as NSData).bytes.bindMemory(to: UInt8.self, capacity: data.count) – Umair Aamir Dec 01 '16 at 12:29
1 Answers
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