search

Home  >  Q&A  >  body text

前端 - iOS 使用WKWebView加载本地html的时候,模拟器下可以显示,真机测试一片空白?

如题,求解,不是Xcode7以后https和http的问题,使用WKWebView真机测试一片空白,模拟器正常显示,使用UIWebView真机和模拟器都正常...为啥,求解决方法,谢谢.

PHP中文网PHP中文网2773 days ago755

reply all(4)I'll reply

  • 黄舟

    黄舟2017-04-17 17:45:33

    . . . I just solved this problem too
    If the real phone is 8.3, the display will be blank
    My own phone is 9.2 and there is no problem

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:45:33

    WKWebView does not support caching, does not support interaction with js, and is not recommended. If you simply want to improve the speed of loading js, or there is no other use for it, generally you should use the system’s native secondary packaging~

    reply
    0
  • 黄舟

    黄舟2017-04-17 17:45:33

    How about trying this: UIWebview, seamless switching of WKWebview

    Is it true that some proxy methods do not allow secondary jumps and redirects?

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:45:33

    The reason is that WKWebView does not allow loading HTML files in the local root directory through the loadRequest method.
    The following method has been added to the iOS9 SDK to load local HTML files:

    http://www.jianshu.com/p/ccb4...

    reply
    0
  • Cancelreply