How to get server response data in NSURLSession without completion block

A couple of thoughts: First, instantiate your session with a delegate, because background sessions must have a delegate: NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:kSessionIdentifier]; self.session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:nil]; Second, instantiate your NSURLSessionUploadTask without a completion handler, because tasks added to a background session cannot use completion blocks. Also note, I’m using a file URL … Read more