After Swift3, I get an error UnsafePointer. The proposed debugger solution is actually not clear enough to do anything.
I know what UnsafePointerwas raised in the previous question The problem with UnsafePointer in a SQLite project in Swift , but I'm struggling to relate its answers to this problem.
Error:
'init' is unavailable: use 'withMemoryRebound(to:capacity:_)' to temporarily view memory as another layout-compatible type.
the code:
let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) {
SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0))
}
Does anyone know how to fix this?
source
share