Allow UIWebView to load http://localhost:port/path URIs without an Internet connection

前端 未结 1 1575
盖世英雄少女心
盖世英雄少女心 2020-12-30 09:09

I am working on an iPad app which has an embedded HTTP server listening on a high port, and I am loading pages from this HTTP server using a UIWebView.

相关标签:
1条回答
  • 2020-12-30 09:14

    You may want to investigate defining your own scheme and implementing it with NSURLProtocol instead of running an HTTP server. This will allow you to handle the loading of URLs without having to implement the HTTP protocol, and will get around this issue with the SDK where the HTTP protocol fails early if you have no network connection.

    0 讨论(0)
提交回复
热议问题