Skip to content

codingiran/NetworkChangeNotifier

Repository files navigation

NetworkChangeNotifier

Repo

https://github.com/codingiran/NetworkChangeNotifier

Use

// create instance
private let networkChangeNotifier = NetworkChangeNotifier(queue: .main, debouncerDelay: .milliseconds(2500))

// start listen
networkChangeNotifier.start { [weak self] interface in
    // get interface change notification 
}

// get current interface
let currentInterface = networkChangeNotifier.currentInterface

// get current interface name
let currentInterfaceName = networkChangeNotifier.currentBSDName

About

NetworkChange watcher on Apple Platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages