Take the 2-minute tour ×

I am primarily looking for advice on how to further troubleshoot this. I have code that ran without issue in iOS 4.x and was the typical:

[[NSURLConnection alloc] initWithRequest:request delegate:self];

The URL is a SalesForce.com API SSL URL. All delegate methods are in place (including the NSURLConnectionDataDelegate) and the oddness is as follows:

  1. The first request loads properly... all delegate methods fire and data is received
  2. Any subsequent NSURLConnection to the same base URL from the same class or any other class in the app fails
  3. The didFailWithError: delegate method is firing on all subsequent requests (showing the timeout)
  4. Requests to any other URL (like https://www.google.com) still work
  5. If I change the Salesforce URLs to non-SSL everything works fine
  6. It's a valid certificate as far as I can tell (and why does it work once?)

So for some reason the request to the SalesForce URL works once and all follow up requests timeout. Other URLs still seem to work. This only occurs in 5.x sim, 4.3 works fine.

How can I proceed to debug this? I am stuck at this point without a clue as to where to go.

  • Mike
share|improve this question
add comment

1 Answer

The server might have restricted multiple calls at the same time using a particular login credential. Try placing your requests once you get the response for the first one. An operation queue might help.

share|improve this answer
Thanks for reply... the same code runs in 4.3 which makes me think it's something specific about the way 5.x is sending the request but I don't know how to troubleshoot that. The URL is public (accesible in a browser) and I can reload it there endlessly. –  Mike Dec 20 '11 at 15:22
Post some code and the check whether the authentication delegate methods of NSURLConnection are called for the subsequent requests. –  sElanthiraiyan Dec 21 '11 at 7:04
add comment

Your Answer


