79161417

Date: 2024-11-06 05:33:08
Score: 1
Natty:
Report link

In iOS, WKWebView doesnt support loading a local HTML file with remote resources directly using both loadFileURL(:allowingReadAccessTo:) & loadHTMLString(:baseURL:) in the same request.

However, you can achieve your goal by reading the local HTML file as a string, then using loadHTMLString(_:baseURL:) with the appropriate base URL to access both local and remote resources.

Here’s how:

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Tanmay Patil