本文介绍了可可App Web视图未加载请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用webview加载了url,但未加载.

I have used webview to load url but it is not loaded.

我已经用wkwebview尝试了相同的操作,但是无法加载网址.

i have tried the same with wkwebview but couldn't load url.

我已经完成了

  • 导入WebKit
  • Info.plist
    • 允许任意负载-是
    • 允许任意加载Web内容-是
    • import WebKit
    • Info.plist
      • Allow Arbitrary Loads - YES
      • Allow Arbitrary Loads in Web Content - YES

      日志:

      dnssd_clientstub ConnectToServer:connect()->尝试次数:1

      dnssd_clientstub ConnectToServer: connect()-> No of tries: 1

      dnssd_clientstub ConnectToServer:connect()->尝试次数:2

      dnssd_clientstub ConnectToServer: connect()-> No of tries: 2

      dnssd_clientstub ConnectToServer:connect()->尝试次数:3dnssd_clientstub ConnectToServer:connect()失败路径:/var/run/mDNSResponder套接字:11 Err:-1 Errno:1不允许操作

      dnssd_clientstub ConnectToServer: connect()-> No of tries: 3dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:11 Err:-1 Errno:1 Operation not permitted

      nw_resolver_create_dns_service_locked DNSServiceCreateConnection失败:ServiceNotRunning(-65563)

      nw_resolver_create_dns_service_locked DNSServiceCreateConnection failed: ServiceNotRunning(-65563)

      -代码

       @IBOutlet weak var webvw: WebView!
      
       override func viewDidAppear() {
              super.viewDidAppear()
      
              guard let url = URL(string: "https://www.google.co.in") else { return }
              let request = URLRequest(url: url)
      
              webvw.uiDelegate = self
              webvw.frameLoadDelegate = self
              webvw.mainFrame.load(request)
          }
      

      推荐答案

      检查功能>传入和传出连接

      Check capabilities > Incoming and outgoing connections

      这篇关于可可App Web视图未加载请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 19:27