Unable to read data nsurl

Welcome all,


I'm having an issue with loading JSON data from an URL by NSURL class.

Unfortunately, it is not working even I give permission from the plist.

let urlstr = "MYURLgoes here"       
        let Url = NSURL(string:urlstr)!
        print(Url.absoluteString)
        let task = NSURLSession.sharedSession().dataTaskWithURL(Url) { (data, response, error)->Void in
            if let urlcontent=data
            {
                print(urlcontent)
            }
            else{print("NotExist")}
        }


I have tested my url and it is working perfectly.


Im really new to ios development,I would be thankful if some on can help me to figure this issue out

Unable to read data nsurl
 
 
Q