iOS Development Series - Network Status Monitoring

Overview

In network applications, it is necessary to monitor the network status set by the user in real time, so that the user can understand the network status and prompt the user if there is a network problem.
Generally, some processing needs to be done in the scenario of poor network status, such as:

  • WIFT/3G/4G network: Automatically download high-definition pictures. Download thumbnails for scenes with bad network.
  • No network showing offline cached data

Network Monitoring

Option One

Apple's official Reachability sample program.
Download addresshttps: //developer.apple.com/library/ios/samplecode/Reachability/Reachability.zip

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324599321&siteId=291194637