xcode - get value from website in mac OS 10.12.1 & iOS 10.1.1 -


getting error since latest update. can't data returned https website.

please help

code:

func getvaluefromwebsite(_ url: string, showerror: bool) -> string {     var xml:string = ""     let url = url(string: url)     let request = nsmutableurlrequest(url: url!)     let session = urlsession.shared     session.sendsynchronousrequest(request: request) { data, response, error in         xml = string(data: data! data, encoding: string.encoding.utf8)!         xml = xml.replacingoccurrences(of: "\"", with: "")         xml = xml.replacingoccurrences(of: "\r\n", with: "")     } return xml } 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -