My protocol specifies one function, which returns a
URLSessionDataTask
. NSURLSession
has the same function, except it returns a NSURLSessionDataTask
, which adopts URLSessionDataTask
, so I would expect this to work.