Does NSURLSession have an internal NSoperationqueue protection?

A) If an NSURLSession runs a task in the background in iOS7, has Apple included an internal queue in NSURLSession? How does it work in the secondary stream, as well as in the suspended application mode?

B) What is the difference between NSURLSession and NSoperationqueue?

C) If NSURLSession is a replacement for NSURLCOnnection, can we integrate NSURLSession into NSOperationQueue?

D) Both are the same?

E) Can we do the same in NSURLSession as in NSoperationQueue?

f) Is there any time limit for completing a task in the background after closing the application? because iOS7 does 2 minutes and ios6 does 10 minutes?

G) Tutorial "in the" Configuration and Restriction "section, NSURLSessionDataTasks are not supported at all in background sessions, and you should use these tasks only for short-term, small requests, and not for downloading or downloading. Some tutorials say that there are no time limits, we can upload or download data, the size can be any. Please explain more about this? If NSURLSession is a replacement for NSUrlconnection, which one is the best in all situations? What is the future of NSUrlconnection?

+4
source share
1 answer

A) Yes, NSURLSession has an operation queue that supports all session task delegates in the queue.

B) , NSURLSession NSOperationQueue . , NSURLSession NSOperationQueue. NSURLSession - API NSURLConnection, NSOperationQueue.

C) NSOperationQueue. NSURLSession NSOperationQueue .

D) . A, B, C

E) , , NSURLSession NSOperationQueue, NSURLConnection.

F) NSURLSession iOS7

[NSURLSessionConfiguration backgroundSessionConfiguration:@"identifier"];

, iOS7 180,0 . 30,0

G) , / , . OS . 30.0 , NSURLSession .

NSURLSession , iOS8, NSURLSession. , , , .

+9

Source: https://habr.com/ru/post/1543969/


All Articles