Ramis Ramis - 10 months ago 56
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 Source

Do like this,

let bytesDecrypted: UnsafeMutablePointer<Int> = nil