How to get network changing status ?

I wonder. Can you catch when the network signal is weak.

please anyone help me.

Replies

Can you catch when the network signal is weak.

What platform are you targeting?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I support mobile (ios 8 ↑)

I using Reachability open source framework.


please reply me.

I support mobile (ios 8 [and later])

OK.

Second question: What you planning to do with this value?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

hi.


Q:Second question: What you planning to do with this value?


A:When the network signal is weak,

the api request is stopped and the notification window is displayed.


please give me an answer.

thank you.

When the network signal is weak, the api request is stopped and the notification window is displayed.

I strongly recommend against doing that. The problem is that it can result in both false positives and false negatives:

  • The network signal might be weak and yet your app has excellent connectivity, for example, an iOS device on stage at WWDC which is connected to the Internet via Ethernet.

  • The network signal might be strong and yet your app has very poor connectivity, for example, if you’re on a train, where Wi-Fi signal is strong in each carriage but the the overall connection to the Internet is provided by a single over-stretched WWAN.

The only valid way to determine whether connectivity is good is to run a network request and see how it performs. If you’re issuing a lot of requests, you can use the performance of those requests to build a running estimate of how well the networking is doing, but keep in mind that this can change from moment to moment (the train entering or leaving a tunnel, the user entering or leaving a lift, and so on).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"