UnsafePointer initializer in Swift 3

前端 未结 3 507
挽巷
挽巷 2021-02-05 04:09

I have a receipt validation class that is deprecated since Swift 3 has released. I fixed some issues, but I still have many ...

Here is the GitHub source code I used : h

3条回答
  •  轮回少年
    2021-02-05 04:52

    May have recently changed to just this, without the ".bytes." part:

    var p: UnsafePointer = data.assumingMemoryBound(to: UInt8.self)
    

    from the original:

    var p = UnsafePointer(data.bytes)
    

提交回复
热议问题