So till some point of time I used this:
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
...Some code here
}];
But then I realized that there is always one case when such approach crashes the app.
For example, try use code on slow internet connection and till the block is done try to enter background and then return to the app again. You'll see that it crashes with EXC_BAD_ACCESS
So is sendasynchrequest
block so worthless? Or am I missing something when using it?
Thanks in advance!