iOS 13 WKWebView not showing pdf file anymore
I figured out that the response' content-type was "application/octet-stream" instead of "application/pdf"
So I load the WKWebView
as:
if let myURL = URL(string:"somefileurl.pdf") {
if let data = try? Data(contentsOf: myURL) {
webViewPdf.load(data, mimeType: "application/pdf", characterEncodingName: "", baseURL: myURL)
}
}