AFNetworking and No Internet Connection scenario

后端 未结 5 1526
误落风尘
误落风尘 2020-12-07 17:21

I use AFNetworking in my app for every request (like login, get data from url, etc).

Take this for example: an user click on the login button and there\

5条回答
  •  自闭症患者
    2020-12-07 17:38

    As of 0.9, AFHTTPClient actually has network reachability built-in (a simpler interface to Apple's aforementioned Reachability code). Just include the SystemConfiguration framework and use -setReachabilityStatusChangeBlock: to specify a response when the reachability state changes.

提交回复
热议问题