iframe content from external source not loading in local HTML file on iOS
问题 I created a local HTML file in my iOS app written in swift. The HTML file is loaded into a WKWebView as follows: let url = Bundle(identifier: myIdentifier).url(forResource: "localHtmlFile", withExtension: "html") let htmlFormatString = try String(contentsOf: url) loadHTMLString(string: htmlFormatString, baseURL: nil) The HTML page contains an iframe which I expect to load an external page: <div>Test</div> <iframe src="https://www.somepage.com"></iframe> The local HTML file is loaded