Questions tagged [wkwebviewconfiguration]

173 questions
1
vote
0 answers

Detect embed video url from website in WKWebView

I'm using WKWebView instead of UIWebView. But I did not get a way to fetch the url of embedded video. I have tried with these methods: [wkWebView evaluateJavaScript:@"document.querySelector('video').currentSrc;" completionHandler:^(id result,…
Antony Raphel
  • 2,036
  • 2
  • 25
  • 45
1
vote
2 answers

How to call a javascript function from WKWebview when message is received from webapp

I am developing an ios application that uses WKWebview to display my web application. I have a simple button in my frontend which send the message to WKWebview via window.webkit.messageHandlers.isLocationPresent.postMessage("checkLocation"). IOS…
shikhar
  • 174
  • 1
  • 11
1
vote
1 answer

WKWebView for Subframes

I am trying to use WKWebView to create a mobile web browser for a website. The main problem with the website is it's made up of one main frame (login page) then a bunch of subframes. I'm trying to use a WKNavigationDelegate to track each page that…
1
vote
1 answer

WKWeb View does finish loading of page in swift iOS?

I have created a WKWebView. It loads the url of MSB ie. My school bucks. It loads almost all url for payment. But at one url didFinishLoad is not getting called. I have added all the delegates for the web view.but certainly it is not working. The…
TechChain
  • 8,404
  • 29
  • 103
  • 228
1
vote
0 answers

Automating webscraping with WKWebKit

I'm scraping a site that requires multiple steps, and each JavaScript line needs to be run after the webview is done loading. So far I've just been doing this manually by pressing a button when the page loads. How do I make the next step happen when…
John Smith
  • 11
  • 3
1
vote
1 answer

Detect Youtube Play button action in WKWebView

How to detect action of Play button clicked in youtube in wkwebview, I have gone through this question, it is some how similar to my question but not duplicate and unanswered. Any help will be appreciated. Thanks.
Abhishek Mitra
  • 3,335
  • 4
  • 25
  • 46
1
vote
0 answers

The operation couldn’t be completed. (NSURLErrorDomain error -999.)

Throwing "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" error in WKNavigationDelegate method webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) each time when i try to load the html…
SriMa
  • 197
  • 1
  • 1
  • 12
1
vote
2 answers

Ionic 3 Response with status: 0 for URL: null

I have an Ionic 3 app. I recently added the iOS platform. When i run it on iOS (emulator and device) all the server requests that has headers fail with the error "Response with status: 0 for URL: null". On Android those requests works fine. If I do…
1
vote
2 answers

PDF from URL not displaying correctly in WKWebView?

I can get HTML pages, YouTube videos, etc. to load into this WKWebView and display correctly, but PDFs tint the entire view, are cropped at the bottom, and cover the background of the nav bar when scrolled up. I want the PDF to only display in the…
user3753722
  • 153
  • 2
  • 11
1
vote
1 answer

WKwebview Javascript function Geolocation

Hello Guys I'll hope that you can help me. I have a Wkwebview which opens a website "example.com". This website includes a Javascript file with many functions (the Javascript is not located in the local store of the app, it's recommanded by a…
1
vote
1 answer

Is it is good practice to use internal localhost server for wkwebview by ionic team?

Official ionic doc https://ionicframework.com/docs/wkwebview/#cors CORS Unfortunately there’s no API to disable this, so you’ll need to ensure any remote API that your app use, implement CORS correctly: CORS MDN Docs Origin:…
Himanshu sharma
  • 7,487
  • 4
  • 42
  • 75
1
vote
2 answers

Shared cookies with WKProcessPool for WKWebView in Swift

Can anyone please tell me how to create a WKProcessPool in Swift? I'm not familiar with Objective-C. I have to create a WKProcessPool in order to have shared cookies with all WKWebViews. I want to keep cookies even when showing another…
Stef
  • 1,183
  • 1
  • 9
  • 12
1
vote
1 answer

Share session between multiple WKWebView

I need to implement billing logic. It does a few redirects and then opens the new frame in the new window – that's how it works on the web-browser. I'm showing the billing frame in the WKWebView. I catch the moment when it wants to open the new…
AlexEdunov
  • 357
  • 1
  • 15
1
vote
1 answer

iOS: evaluateJavaScript will not invoke function when parameter contains newline character

The goal is to invoke a callback function inside a web page contained inside a WKWebView. evaluateJavaScript breaks when its parameter contains the newline character, meaning the callback function never gets called. Why is…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
1
vote
1 answer

Call a swift function from java script that returns a value using wk webview

I want to call a swift function from java script code which returns the device id back to the script, I had added the code that use currently. Please advise how to return the value back to the java script from the swift function, Thanks in…
Mohanraj
  • 587
  • 4
  • 21