我尝试使用以下代码创建网址:
方法1:
let url = URL (string: "https://xxxx-xxxx.com/xxx.html?tokenID=PuUPbFjauRZNPrHQot3Xea70loblCZL3GP9HOrjDP7vTvP3ROWDZrmFJlvKBC1oQ&MobileKey=DE1C-7B19-9CFC83CB83C8||Apple,simulator&widvalue=cl-mobile-dashboard")
let requestObj = URLRequest(url: url!) // <<== error here!
但是我收到了错误
主题1:EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0)
方法2:
var _request : URLRequest?
if let webViewURL = URL(string: "https://xxxx-xxxx.com/xxx.html?tokenID=PuUPbFjauRZNPrHQot3Xea70loblCZL3GP9HOrjDP7vTvP3ROWDZrmFJlvKBC1oQ&MobileKey=DE1C-7B19-9CFC83CB83C8||Apple,simulator&widvalue=cl-mobile-dashboard") {
_request = URLRequest(url:webViewURL) // <<== execution not entering this block!!
}
有人可以帮帮我吗?提前谢谢。