I want to Show a banner in iOS app when network not reachable and disable apps functionality until it is reachable again . Is it possible? -


i had created ios app crashes when network not reachable since data received nil. since don't want update parts of code accessing network , want show banner when internet not reachable , temporarily disable parts of app docent crashes . saw feature in uber app , curious . can me in matter ? thank

yes, of third party library outside used networking use apple class called reachability. reachability helps check if there internet connection before calling web service or network functionality in general. can use in 2 ways:

  1. test if connectivity available before doing network operation
  2. register observer connectivity status changes

to want achieve register interesting classes observers , once notification check if internet connection available or not, doing operation want: alert user, put overlay on interface block user operation until connection available again.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -