Ramis Ramis - 1 month ago 10
Swift Question

How to fix warning init() is deprecated

For the code line:

let bytesDecrypted = UnsafeMutablePointer<Int>()


I am getting the warning:
'init()' is deprecated: init() will be removed in Swift 3. Use
nil
instead


What is the correct way to fix this warning?

Answer

Do like this,

let bytesDecrypted: UnsafeMutablePointer<Int> = nil
Comments