ios - Link Not working ... Why? -


link not working properly:

let mooviturl: string = "moovit://nearby?lat=40.758896&lon=-73.985130&title=\(barnametemplate)&partner_id=<nightout>"          let escapedstring = mooviturl.addingpercentencoding(withallowedcharacters: .urlhostallowed)         uiapplication.shared.openurl(url(string: escapedstring!)!) 

saying:

fatal error: unexpectedly found nil while unwrapping optional value 2017-08-14 22:49:35.983585+0300 testapp[10658:6538686] fatal error: unexpectedly found nil while unwrapping optional value 

crashing on line:

uiapplication.shared.openurl(url(string: mooviturl)!) 

swift doesn't think string actual url, returned nil. when tried force unwrap (!), gave error.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -