Here is an example NSURLSession request:
[[session dataTaskWithURL:[NSURL URLWithString:someURL] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
From the documentation: "This method is intended as an alternative to sendAsynchronousRequest: queue: completeHandler: method NSURLConnection, with the added ability to support user authentication and cancellation." Short answer: yes, NSURLSession will perform background operations. You do not need to worry about this by blocking your user interface.
source share