Hi All,I have having some issue with using NSURLSession in Xcode7 and Swift2. For some reason I keep getting NSURLErrordomain error but the same codeis working on Xcode6 with swift 1.2.let baseURL = NSURL(string: https://itunes.apple.com/search?term=one%20republic) let downloadTask = session.downloadTaskWithURL(baseURL!, completionHandler: { (location, response, error) -> Void in if(error == nil){ let objectData = NSData(contentsOfURL: location!) let tmpData :NSString = NSString(data: objectData!, encoding: NSUTF8StringEncoding)! print(success) } else { print(Failed) } }) downloadTask!.resume()https://drive.google.com/file/d/0B-bZj242s5iAX2Z0bzVETjE3akk/view?usp=sharingPlease let me know if I am missing something here.
3
0
13k