Reputation:
I am writing an application which downloads very much JSON data from the internet. My app needs to parse this JSON data and afterwards return the retrieved objects to a self-made delegate.
Now I was wondering if I could better use NSURLConnection or a combination of Grand Central Dispatch's dispatch_async
with initWithContentsOfURL:
(using GCD to prevent hanging).
Using Grand Central Dispatch is much easier to implement, especially because I don't need delegates nor NSMutableData nor all other variables that are used temporarily. But of course, everything with pros has its cons.
What are the advantages of NSURLConnection over initWithContentsOfURL
with GCD?
Upvotes: 3
Views: 1149
Reputation: 43472
That's it off the top of my head. :)
Upvotes: 4