iPhone - app crashing with poor internet connection
<p>I have an iPhone app which communicates with a server to get the data being displayed. I have tested this app on a wifi connection and a good 3G connection. The app works without an issue. But if I test the app on a poor connection, the app crashes.</p>

<p>I get an XML from the server and parse it before displaying the data. I have put in the NSXMLParser method to show an alert if the parsing fails. The n/w connection code is also placed in try/catch blocks and we show an alert if the control goes to the catch block.</p>

<p>On a poor internet connection, the app just crashes (doesn't even go to the catch block) and checking the crash logs suggests the app could not get the complete response. Shouldn't it go to the catch block in that case? (I am using a wrapper class to make a synchronous connection)</p>

<p>This will always be an issue in any app using the internet if the connection is poor. Is there any way we can avoid this?</p>

<p>Thanks.</p>

<p><b>
I am using the <a href="http://kosmaczewski.net/2008/10/18/rest-and-objective-c-again/" rel="nofollow">code provided here</a> as the base for creating connections and getting the response</b></p>
