I am trying to check for an internet connection by testing if the parser returns nil after initialiing with this statement- NSXMLParser *xml = [[NSXMLParser alloc] initWithContentsOfURL:url]
however when I debug the iphone in airplane mode, xml is initialized and my program ends up crashing later. shouldn't xml be nil if it is unable to obtain the contents of the url?