Skip to content
An NSURLConnection subclass that implements sendAsynchronousRequest:queue:completionHandler: in iOS 4
Objective-C
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
BCURLConnection.h
BCURLConnection.m
README

README

+ (void)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSOperationQueue *)queue completionHandler:(void (^)(NSURLResponse*, NSData*, NSError*))handler

iOS 5 added a new method for sending URL requests using blocks rather than a delegate. Unfortunately it is not 
compatible with iOS 4. This subclass implements that method in iOS 4, or uses the iOS 5 version if available.

This class uses Automatic Reference Counting (ARC). If your project does not use ARC, you can add the flag 
-fobjc-arc to BCURLConnection.m under build phases.
Something went wrong with that request. Please try again.