Quantcast
Channel: User kubi - Stack Overflow
Viewing all articles
Browse latest Browse all 39

Answer by kubi for "Does not conform to protocol" error when extending different class

$
0
0

What I ended up doing was creating a protocol extension that creates the necessary method that NSURLSession requires.

extension NSURLSession : URLSession {  func dataTaskWithURL(url: NSURL, completionHandler: SessionHandler) -> URLSessionDataTask {    return dataTaskWithURL(url, completionHandler: completionHandler) as NSURLSessionDataTask  }}

Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>