Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-27-2009, 05:08 PM   #29 (permalink)
sleepless
Registered Member
 
Join Date: Jun 2009
Posts: 11
sleepless is on a distinguished road
Default

Note that the Reachability example was rewritten so the above will not work via simple copy/paste...

The new code in your app would look like this:

Quote:
Reachability *r = [Reachability reachabilityWithHostName:@"www.maxqdata.com"];

NetworkStatus internetStatus = [r currentReachabilityStatus];

if ((internetStatus != ReachableViaWiFi) && (internetStatus != ReachableViaWWAN))
{
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@"You require an internet connection via WiFi or cellular network for location finding to work." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[myAlert show];
[myAlert release];
}

Last edited by sleepless; 08-27-2009 at 05:13 PM.
sleepless is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,177
Threads: 93,918
Posts: 402,138
Top Poster: BrianSlick (7,966)
Welcome to our newest member, felishsheldon
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:06 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.