It depends on exactly what changes in the network state you want to be informed of (e.g. do you just want to know when you gain or lose a network connection, or do you want to know things like if you've switched WiFi networks or some more esoteric detail like that), and if you provide more details about that I can provide a better answer, but generally speaking I reckon you want to use the SystemConfiguration
framework, specifically probably the SystemConfiguration/SCNetworkReachability.h
APIs (described in Apple docs here).
Even more specifically than that, I think SCNetworkReachabilityCallBack
is the type of callback function you want to use. This here is the Apple documentation for it.
Finally, to set up that callback, I mean first you have to write your callback function, but to "register" it so SystemConfiguration will use it to call you back when your network status changes, use this guy: SCNetworkReachabilitySetCallback(_:_:_:)
described in official Apple documentation here.
Hope this helps and if you want more specific help just add some more specifics to your question :)