How to use iOS Reachability

0 votes

I'm developing an iPhone app that uses the network. The iPhone communicate with my server via HTTP request and should work on WiFi and 3G.
I currently use NSURLConnection initWithRequest to send async requests to my server and get responses (but I will soon move to work with ASIHTTPRequest library)

I understood that with this kind of apps(apps that requires internet connection) I should (must?) use Reachability.

After searching the web and looking at Apple's Reachability example code i still don't understand some basic stuff:

What is the main purposes of Reachability?

In apple's example they detect network issues with the host, WiFi and 3G and present the user with an appropriate message.
Is this the main purpose of Reachability, to show the user a message? Or do I need to use it for other more practical scenarios? For example if NSURLConnaction request has failed do I need to use Reachability somehow to resend the request?

What is the proper use of Reachability?

Is it common to use only one instance when app launch, and then listen to network changes? Or should I check myself the reachability status before every network request?
Is it enough to use reachabilityWithHostName or do I need also reachabilityForLocalWiFi and reachabilityForInternetConnection?

One more thing, I understood apple can reject apps that use the network and don't use Reachability.
What are the "must" do methods I should implement?
Will it be enough to just notify the user that currently there is no internet?


 

Nov 9 in Mobile Development by gaurav
• 22,040 points
29 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Mobile Development

0 votes
0 answers

How to login to a site using POST request? (Swift,iOS)

I want to create an iOS Application ...READ MORE

Nov 9 in Mobile Development by gaurav
• 22,040 points
39 views
0 votes
0 answers

How to draw heart shape in UIView (iOS)?

I want to create different shapes. Below ...READ MORE

Nov 10 in Mobile Development by gaurav
• 22,040 points
25 views
0 votes
0 answers

How to open app from Twitter for iOS WebView on iOS 9

My question pertains to deeplinking from a ...READ MORE

Nov 10 in Mobile Development by gaurav
• 22,040 points
44 views
0 votes
0 answers
0 votes
0 answers
0 votes
0 answers
0 votes
1 answer

Getting country calling prefix

For a class that offers both this ...READ MORE

answered Sep 20 in Others by Aditya
• 7,660 points
77 views
0 votes
1 answer

Is there a way to to check if a picture was taken on that iPhone?

Actually, the model and manufacturer information is ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,680 points
38 views
0 votes
1 answer

Detect if the device is iPhone X

The response to your query is "no" ...READ MORE

answered Nov 8 in IOS by Rahul
• 9,680 points
47 views
0 votes
0 answers

How to receive single tap and hold Remote-Control Event with iOS

I'm looking for my app to listen ...READ MORE

Nov 8 in Mobile Development by gaurav
• 22,040 points
38 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP