Questions tagged [wkurlschemehandler]

9 questions
6
votes
1 answer

How to intercept a WKWebView request to detect which local resource files (css, js, png, ...) load together with a HTML file?

I have a HTML file which contains local resource files such as css, js and png files inside its content. These local resource files are in zip format. My app use WKWebView to display this html file. I want to find a solution to intercept the web…
Tony Pham
  • 303
  • 1
  • 3
  • 8
2
votes
0 answers

WKWebView's WKUrlSchemeHandler and Cookies with the Secure property

Since iOS 11, you could use WKURLSchemeHandler with WKWebView: A protocol for loading resources with URL schemes that WebKit doesn't know how to handle. If you used a custom-scheme - let's say foobarhttps - WKWebView does NOT appear to treat it…
rustyMagnet
  • 2,348
  • 19
  • 31
1
vote
0 answers

How to replace WKWebView response with internal resource files?

I have a WKWebView that present an HTML file from the project resource files. Along with the resource files there are CSS and JavaScript files for the web view to use. Side note: These web files are for a compiled React web app. CSS / JS files are…
Bar Malka
  • 410
  • 4
  • 10
1
vote
1 answer

Swift -- values coming into WKURLSchemeHandler are correct the first time and then never change

I'm a bit of a newbie to Swift programming, and may be using some construct that is making a value immutable after it is set once. I have a WKWebView that is running a JavaScript webapp, and in that JS a URL is being called like this: var url =…
WagsMax
  • 13
  • 4
0
votes
1 answer

iOS - WKURLSchemeHandler not called on custom scheme

I want to use WKWebView and WKURLSchemeHandler to catch some links with custom schemes. To understand how it works, I've made a simple project (in Objective-C, sorry) with a local html file containing custom schemes

Local…

Bruno
  • 3,204
  • 4
  • 14
  • 30
0
votes
0 answers

WKURLSchemeHandler delegate doesn't get called during evaluateJavascript

I am loading local html file which will load first and then I will have to load an image that is also available locally only after the html is loaded fully. So, I am setting src for the image tag using id and evaluateJavascript. WKURLSchemeHander…
nOOb iOS
  • 1,356
  • 2
  • 17
  • 33
0
votes
1 answer

How to implement a native WKURLSchemeHandler in cordova-ios 6.1.0

I am working on a cordova ios (6.1.0) project and i want to implement a native WKURLSchemeHandler to intercept the custom scheme handling to solve my cors problems. In detail I want to do something like:…
0
votes
0 answers

How to load local CSS in a remote web page in WKWebView?

Updated question I am loading a remote page that I control into a WKWebview in my app and customizing it by loading local CSS and font files. At page load, in webView:didFinishNavigation:, I am running some JS to inject some style tags and a link…
Tom Hamming
  • 9,484
  • 9
  • 66
  • 131
0
votes
1 answer

How to serve big files using WKURLSchemeHandler?

I am using WKURLSchemeHandler to serve local files that cannot be read directly by the WkWebView. While it works fine for small files like videos, it totally freezes the application when it has to provide big files like videos. Right now, I am…
AP.
  • 4,945
  • 7
  • 43
  • 94