tonymillion/Reachability

Swift 3 issue: Cannot assign value of type '(Reachability!) -> Void' to type 'NetworkReachable!'

plashchynski opened this issue · 1 comments

On Swift 3 got:
Cannot assign value of type '(Reachability!) -> Void' to type 'NetworkReachable!'

Code:

let reachability = Reachability.forInternetConnection()!
        
reachability.reachableBlock = {
    (reach: Reachability!) -> Void in
}

Fixed by:

let reachability = Reachability.forInternetConnection()!
        
reachability.reachableBlock = {
    (reach: Reachability?) -> Void in
}