Questions tagged [wkwebview]

1

votes
0

answer
218

Views

Url loads via SafariViewController but not via WKWebView in iOS

I am running a demo project on iOS 11 device. There is a certain url which i am loading in SafariViewController using below code, which works fine. NSURL *url = [NSURL URLWithString:@'https://myCustomUrlHere']; SFSafariViewController *svc = [[SFSafariViewController alloc] initWithURL:url]; svc.deleg...
iPhoneDeveloper
1

votes
1

answer
441

Views

Sandbox & WKWebView loadFileURL(_, allowingReadAccessTo:) Inconsistency

Using the new shiny WKWebView and sandbox on os/x, require some intervening reset or clear as subsequent calls to load a file URL will be ignored; this is somewhat related to an earlier question on WKWebView loadFileURL works only once - ios there, here on os/X I do if loadURL.isFileURL { webView.l...
slashlos
1

votes
0

answer
158

Views

How to monitor Javascript calls in WKWebView Swift?

I currently have an ios application using WKWebView to load HTML. Sometimes the HTML has buttons or links that execute javascript. For example, the search button on Google executes a javascript command to load the page. I was wondering if it is possible to monitor these javascript calls in the WKWeb...
Grant Emerson
1

votes
0

answer
42

Views

Show “Add to Home Screen” option when loading web page with WKWebView?

How can you display the 'Add to Home Screen' option when displaying a web page with WKWebView?
Crashalot
1

votes
1

answer
359

Views

WKWebKit does not refresh webpage

I am using Xcode 8.3.3 and Swift 3 to develop an app for the iMac using Cocoa. My goal is to use VCgoToWebPage and display a webpage to the user. My program calls this function many times, but the only webpage I see is the last one called. How do I implement a window refresh inside this function and...
TurboPascal
1

votes
1

answer
359

Views

How can I have a single tap to select text in WKWebView

I want one single tap to select text instead of long press to select text. is it a way to do that? or using UIGestureRecognizerDelegate to wake the long press action? thanks.
Carl Hung
1

votes
0

answer
469

Views

How to set Httponly Cookie to WKHTTPCookieStore

I have a NSHTTPCookie which HTTPOnly flag is true. When I use WKHTTPCookieStore's setCookie:CompletionHandler to set cookie, the HTTPOnly flag will automatically convert to false. Than I can read the cookie wanted httpOnly by Javascript code, like 'document.cookie'
S.Captain
1

votes
2

answer
521

Views

Changing the requests from HTTPS to HTTP from WKWebview?

My requirement is to redirecting the HTTPS request to HTTP from WKWebView. But the request initiated inside the webview(Ajax call) are not being captured. After that, the requests being made from that webpage are not captured. Please share your ideas. Much appreciated.
jailani
1

votes
1

answer
213

Views

How can I specify the user agent of a device in a web app utilizing WKWebView in Swift 4?

I have been trying to figure out how to specify a user agent for my web app in Swift 4 so that the website it opens is in mobile-view. It is defaulting to desktop view instead of mobile. Is there any way to fix this? I am currently learning Swift so I am not that familiar with it yet. I have attache...
Jack Nordquist
1

votes
2

answer
2k

Views

iOS Swift WKWebView Maintain User Session Cookies

I know this has been answered in several related forms, but I have been twisting my brain for days trying to figure this out to no avail. I have tried every single solution I could find that seemed to be even remotely related. I am using a WKWebView and loading the url of a website. On that website,...
gdd
1

votes
0

answer
138

Views

UniWebView playing audio from local storage

Using UniWebView we try to display a locally stored html page to play audio that is stored in a sub-folder at the same location as the page. While this works fine for iOS 10, 11; we seem to have a problem on iOS 9 where the audio doesn't play. After inspecting the page in Safari, there was an error...
Dalius Grazinskis
1

votes
0

answer
47

Views

WKWebview to send YES always for network check?

If the page loaded in the WKwebview tries to check the network availability using window.navigator.isonline, it should always return yes even if the device is not connected to the internet. I don't have access to the content(javascript/ html/ css) loaded in the WKwebview Is it possible to achieve t...
jailani
1

votes
0

answer
46

Views

CSS3D overlapping divs on Mobile Safari

Mobile Safari shows the correct version of the UI for a split second. After that the translated 3d surfaces cut into each other. .top { background-color: #a58855; transform: translateY(-50px) rotateX(90deg); -webkit-transform: translateY(-50px) rotateX(90deg); } Please see full code on jsbin Any ide...
Jakub Pawlowski
1

votes
0

answer
668

Views

How to enable Javascript Webview or WKWebview in iOS

I develop a mobile application and my application have to connect a website. I try make a webview and Wkwebview but I didn't get any result. Website have 3 textbox and Javascript func control this textbox. If textbox text is not valid, textbox border is red when click the button. But my webview does...
Akif Demirezen
1

votes
0

answer
26

Views

My image is laying on top of my text

I am trying to style my image and my text. I was able to center the image on the top. But I can't get the text to go under the image. I have included my code. I am trying to do the constraints programatically. class LadyDetailViewController: UIViewController { var webView: WKWebView! var detailItem...
CL Maciel
1

votes
0

answer
53

Views

WKWebview and 360 pics

Just for testing purposes I'm trying to show a react-vr example (https://radvalentin.github.io/react-vr-samples/src/TourSample/index.html) in a WKWebView, the website loads only on the device while on the simulator the screen stays blank. Apart from that on the device I can't interact with the 360 p...
Valerio Donfrancesco
1

votes
1

answer
144

Views

How to get value bind in hidden field in a page loaded in WKWebView

I need to read a value that is dynamically loaded in the input field that is in hidden on html page. I am loading that webpage in WKWebview. I have few fields that I need to fill and there will be a JavaScript which executes on filling up the last field. Once the js is executed, that value is genera...
user3584797
1

votes
0

answer
312

Views

Swift Evaluate Javascript

I am using JavaScript in my app. It works when the web page is loaded in viewDidLoad, but not when it is loaded at the same time as the webView. I have tried using webView with didFinish, but that didn't work. Any suggestions? Here is my code: self.webby.load(URLRequest(url: URL(string: 'https...
Ben A.
1

votes
1

answer
289

Views

How can I Detect Play/Pause events of a video player in WKWebView?

Consider there's a youtube video being played within a web view, using embedded code, let videoID = 'oxtP3wxXlTA' // https://www.youtube.com/watch?v=oxtP3wxXlTA let embededHTML = 'function onYouTubeIframeAPIReady(){ytplayer=new YT.Player('playerId',{events:{onReady:onPlayerReady}})}function onPlayer...
swiftDevStart
1

votes
0

answer
248

Views

Persist WkWebView Session

I have a server List in Native. When one of the items on the list is clicked, I am using WKWebView to load an URL from item. Each of the server have their own login session. Now when I open one of the server pages in WKWebView and come back to the server list and select the same server again. Inst...
Yogesh Jillanda
1

votes
0

answer
277

Views

Webpages loaded in WKWebView does not respond to keypress events

I want to enable keyboard shortcuts like Cmd+c , Cmd+v to work on webpages loaded inside WKWebView, but cannot find a solution. Webview on the other hand has methods like Copy/Paste/Cut which could be leveraged by overriding (void)keyDown:(NSEvent *)event method. But WKWebView does not seem to have...
1

votes
1

answer
446

Views

WKWebview not fully loaded in iOS 10.3

I got the problem that I'm loading a local html file in a WKWebview. My procedure is working for iOS 8, 9, 11 but not for 10.3. There is just white space in the middle of the text. I'm creating my WKWebview like this: let webConfiguration = WKWebViewConfiguration(); let frame = CGRect(x: 0, y: 0, wi...
Marcel Gangwisch
1

votes
0

answer
159

Views

WKWebView delegate method error message

I am using WKWebView to load and display the content of a web site. After the app was launched and running, the delegate method -webView:didFailNavigation:withError:got called. Following is the error description (error.description) extracted from this delegate method using Xcode debugger: Error Doma...
stspb
1

votes
0

answer
241

Views

How to easily deal with ssl certificate in WKWebView

I'm working on a mobile app that will only display a web site. It's not a big project, it's just to show how the web site that i aim could be renderer in an app like this. I've manage to do it in Android with the WebView object, but i had to deal with ssl certificats, and Timeout exception. Now tha...
Usapii
1

votes
1

answer
221

Views

WKWebview not syncronizing cookies after I log out of a domain, opened on it

I am developing a WKWebview app in swift. Here One needs to login to a specific domain. For this , I am throwing a cookie with logged in information/token. But the problem occurs when I try to logout and the check if token exists? And the token still exists even after logout. Note - I checked on c...
Mobile_Developer
1

votes
0

answer
417

Views

window.open() has no effect in WKWebView

I'm trying to open new tab in a WKWebView, but when I call window.open() from javascript (using the Safari debug console for example), this has no effect. I would expect it to trigger: func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction:...
Footjy
1

votes
1

answer
658

Views

WKWebView custom URL scheme doesn't work with https? (mixed content blocked)

I have a WKWebView to load a website that has a custom url scheme (mycustomurl://) implemented with WKURLScheme, which the website will call using GET. Everything works as expected when the website is in http://, but breaks when I switch to https:// with the following error: [blocked] The page at ht...
bkaooo
1

votes
0

answer
150

Views

WKWebView modify Action Sheet button

Is there a way to modify Action Sheet button? In app I have a WebView. After long press on image it gives 'Save image' button. After tapping it app crashes, because Photo Library permission isn't allowed. What I'm trying to do is on 'Save image' to check if there is permission for Photo Library. If...
Babac
1

votes
1

answer
328

Views

HTML Input autocomplete not working in WKWebview

Inputs with autocomplete enabled are working properly when opening in mobile Safari but not when loaded in a WKWebview (iOS 11.3). Is this a known limitation?
tristanbbq
1

votes
1

answer
281

Views

WkWebView copy string app freeze

I have a weird issue, when a user is selecting text in a WkWebView and clicks copy my app freezes up. There is no code run for copying it's just a user using the wkWebView normally. No crash or error is shown but the log shows: Returning local object of class NSString PBItemCollectionServicer conn...
andromedainiative
1

votes
0

answer
199

Views

Intercept WKWebView for pdf download

I have weburl which I converted the in too an iOS app(by opening that url in webview).I have to download pdf from webview. I am ending up with downloading login html page as tmp file in document directory when I clicked download. I assuming that it's not downloading the pdf because we are creating n...
Sandy
1

votes
1

answer
192

Views

Http calls not working ionic-webview (1.2.1) on iOS only on Cellular data

My Http calls to my backend service work fine on Android always and on WiFi on iOS, but as soon as I jump to cellular data I get the following errors TIC TCP Conn Failed : Err(54) and HTTP load failed (error code: -1005 [1:54]) which are the same error messages that are described here TIC TCP Conn F...
1

votes
1

answer
151

Views

Keep login credentials throughout webviews on iOS app (swift)

I'm building an iOS app (swift) that should work like this: First, there's a WKWebView with a login form. Below that, there's a button which uses a navigation controller to open a UICollectionView that displays a series of icons, each one for a different service. Each service opens as a new WebView...
ak71
1

votes
0

answer
122

Views

cordova-plugin-wkwebview-engine reloads app when going back from subpage

Im using the plugin cordova-plugin-wkwebview-engine with my phonegap.build app. And when I load a subpage and then swipe back to the start page, then the start page freezes for about 4 sec before I can scroll it again. And I realised that it is reloading the start page every time I go back from a s...
1

votes
0

answer
177

Views

Saved data on device to autofill forms through WKWebView using Javascript, AngularJS

Let me say this first: I'm not the best in HTML, Javascript or Angular.js I am using Swift 4 and iOS WKWebView in Xcode to go to specific commercial websites and when a user saves his login information to their iOS device (email and password), it populates those fields and submits. I know there are...
HappyMouse
1

votes
0

answer
78

Views

How to stop WKWebView inheriting the previous page's viewport when navigating to a PDF?

I have a WKWebView which displays an HTML page from the local filesystem. The file contains the following meta tag to prevent the user from scrolling: This all works as expected. The page also contains a link to an externally-hosted PDF file. If the user navigates there, the user cannot pinch-to-zoo...
Robert
1

votes
0

answer
216

Views

XCTest - Xcode crashing when trying to record elements inside WKWebView

Create a new Swift Xcode Single view project with UI test target. In Main.storyboard select ViewController, then Editor/Embed in/Navigation Controller. Change ViewController.swift to the following code: import UIKit import WebKit class ViewController: UIViewController, WKNavigationDelegate { var _we...
BadmintonCat
1

votes
0

answer
50

Views

Swift integrated XWebView project now want create iPA file

I am working with XWebView framework in my swift project where I am passing a native object to javascript I have successfully integrated XWebView framework in my project. But when I create an IPA, the organiser window shows 2 different options - one is my project and the other is XWebView framework...
Hitesh Borse
1

votes
1

answer
177

Views

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
1

votes
0

answer
20

Views

How to create a link between html strings

I have an iOS application where there will be a database of HTML strings which will have links to one another. These HTML strings will be loaded into a WKWebkitView. My question is, how can I create a link for another HTML string in my database from within an HTML string? string html1 = @ ' Link to...
Tyler Kelly

View additional questions