iphone - NSURLConnection - how to wait for completion -
Our iPhone app code currently uses NSURLConnection sendSynchronousRequest and it works fine, apart from this we need more visibility in connection progress and caching, so we're going into an async NSURL connection again.
What is the easiest way to wait for the async code to be completed?
"post-text" itemprop = "text">
I am replying to this issue, because in the future a problem may arise on any other issue. Apple's URL Cache Sample Code is a great example of how this is done: You can find it here:
As noted in the above comment John explains - do not block / wait - notify.