I like the idea of loading a small string from the web. I tested it on the simulator and the following code works fine if my internet is connected or not connected. I gave it a 2 second timeout...
Code:
-(void)viewDidAppear:(BOOL)animated {
NSString *connected = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.mysite.com/smallfile.php"]];
wait(20000);
if (connected == NULL) {
NSLog(@"Not connected");
} else {
NSLog(@"Connected - %@",connected);
}
}
EDIT: Tested it on the device as part of a much bigger app. Works as expected in flight mode / normal connection. If you want to increase the timeout perhaps it might be worth it, but it's working fine for me!