Swift Tutorials: Detect change in internet connection using Network framework

preview_player
Показать описание
In this video, we will learn how to monitor changes for internet connection in swift language using the new Network framework. Network framework is introduced in iOS 12. So if you are planning to use Network framework to detect change in internet connection then your app should work on iOS 12.0 and above. For lower version you can use Reachability to monitor for internet connection state in iOS app. Using NWPathMonitor class we can monitor internet connection changes in iOS 12 and above.
Рекомендации по теме
Комментарии
Автор

Thank you for your tutorial! Is there a way to detect Wi-Fi vs. cellular data network?

profgallaugher
Автор

I am getting the wrong status for the path on many occasions both in the device and stimulator. Shared the code in the mail. kindly help with the problem.

marimuthut
Автор

On emulator when it turn off works but when it turns on no

binnie
Автор

thank you, but I wrote exactly the same but doesn't work. it's not calling satisfied. Can you help me pls ?

davidsada
Автор

Can we use this to find the network download and upload speed and network provider info to create internet speed test app??

prakashmaharjan
Автор

What about iPhone data is on it will work or not

lokeshchinatatareddy
Автор

it's not working for me, for the first time it will call satisfied block but after all time it will call else block.
that's the code which i use

amitnegi
Автор

not calling satisfied even if its connected to the internet

rupeshkadam
Автор

how i can handle same situation in ios 9 ????

sulemanali
Автор

if your wifi is working but not connected to internet how can you find out that. don't thing your tutorial is achieving that

prabs