swift - https request working on chrome but not on iOS app -


i trying make ios app using swift requests data server. server running on https , when accessed using chrome, works fine. when try ios request, gives me error "nsurlsession/nsurlconnection http load failed (kcfstreamerrordomainssl, -9802)"

i tried answers given allowing unsecured domains, secured domain (https not http).

my ios code is:

let url = nsurl(string: "https://subdomain.mydomain.com/homescreen.php?variablex=something")         let task = nsurlsession.sharedsession().datataskwithurl(url!) {(data, response, error) in     print(nsstring(data: data!, encoding: nsutf8stringencoding)as! string)     self.embedlink = nsstring(data: data!, encoding: nsutf8stringencoding)as! string 

when run app , open in emulator crashes when click screen code in , displays "exc_bad_instruction (code=exc_i386_invop, subcode=0x0)" on third line - after as! string)

and suggestions appreciated!

for interested, solved issue.

turns out there chain file missing on server, although seemed fine when using browser chrome or firefox, ios more specific in requirements.

i used https://certificatechain.io/ generate crt file , worked perfect since putting in server.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -