Reachability.swift icon indicating copy to clipboard operation
Reachability.swift copied to clipboard

previousFlags private property?

Open karadis opened this issue 9 years ago • 1 comments

Hi, how can i know previous states of reachability (without saving it locally) in reachabilityChanged notification handler? 'previousFlags' property is private even though its marked under public properties (mistake?)

karadis avatar Jan 11 '16 14:01 karadis

Yeah - that was a mistake. Currently you need to save the state locally. I'm considering updating the whenReachable closure signature to something like:

(status: NetworkStatus, previousStatus: NetworkStatus, reachability:Reachability) -> ()

I'm guessing that would solve your problem?

ashleymills avatar Jan 13 '16 16:01 ashleymills