NSURLConnection works on simulator but fails on iphone device?

Find out by inspecting the NSError object that you receive in connection:didFailWithError:. See listing 3 over at the Using NSUrlConnection documentation.

Find out by inspecting the NSError object that you receive in connection:didFailWithError:. See listing 3 over at the Using NSUrlConnection documentation: - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { connection release; receivedData release; NSLog(@"Connection failed! Error - %@ %@", error localizedDescription, error userInfo objectForKey:NSErrorFailingURLStringKey); }.

Thanks for your reply, the problem occurs because of internet connection, error says no internet connection. I want to ask about iphone download. When the iphone is connected via cable to the mac and runs via xcode, is download be made over the mac's internet connection or iphone's connection?

– crazywood Sep 4 '09 at 12:34 I'm not entirely sure, but I'd say it's using the iPhone's connection. – MathieuK Sep 4 '09 at 12:52 ok thanks very much, it's using iPhone's connection, because I provide iPhone's connection and the internet connection problem is gone, but unfortunately there is time-out problem :(( – crazywood Sep 4 '09 at 15:14.

When you use the phone it is connecting through the phone's internet connection. When on the simulator it uses your computer's internet connection. If there is a problem it is probably with the connection on the phone to whatever your connecting to.

Maybe what ever your connecting to is blocking your phone? It's probably not a problem with the application if it works on the simulator.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions