How to get change in network connection notification from iOS Reachability Class?

后端 未结 5 1988
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 05:24

Hi I want to capture whenever user gets a network connectivity in my application for this I have added apples Reachability class and below is the snippet I am using in my ap

5条回答
  •  不思量自难忘°
    2020-12-09 06:14

    You can use this wrapper on reachability to get block based callback whenever there is a change in connectivity status.

    GitHub: UHBConnectivityManager

    If you are using cocoapods.

    pod 'UHBConnectivityManager'
    

提交回复
热议问题