3,874 questions
2
votes
0
answers
50
views
WKWebView navigation very slow during HTTPS redirect chain with repeated server trust challenges (works fine on Android WebView)
I am investigating a navigation performance issue that occurs only on iOS WKWebView, while the same flow works normally on Android WebView.
The app is a Flutter application using InAppWebView, and the ...
-3
votes
0
answers
57
views
visionOS: How could an app show Netflix in the native Apple player if playback comes from a WKWebView?
I’m developing a visionOS app using SwiftUI and WKWebView.
While inspecting Netflix playback inside a web view, I can see that the page contains a video element like:
<video src="blob:https://...
0
votes
0
answers
47
views
Is iOS webrtc communication based on webview stable when app is background
Is iOS WebRTC communication via WebView stable when the app is in the background?
I'm implementing SIP communication using JsSIP within a WebView. On iOS, I'm using WKWebView, but I'm concerned that ...
1
vote
1
answer
130
views
Leaflet marker icons intermittently disappear (shown as “?”) in WKWebView on iOS, even with data-URI icons
Context
I’m embedding a Leaflet map inside an iOS app using WKWebView (BeeWare/Toga, but this seems WebView-level rather than framework-specific).
Problem
Leaflet’s default marker icon and shadow ...
0
votes
1
answer
84
views
Flutter iOS WebView doesn’t trigger password-reset request when opened from second WebView (Android works fine)
I’m working on a Flutter app that integrates an external authentication system provided by another company. The login and password-reset flows are handled entirely inside a WebView (their backend + ...
0
votes
0
answers
90
views
Edges of WebView flicker while SwiftUI NavigationSplitView shows/hides sidebar on macOS
My macOS app uses a SwiftUI NavigationSplitView for almost all of its UI. However on one tab the entirety of the UI is a web view. The problem is that web view seems to like flicker as the ...
0
votes
0
answers
49
views
Disable bar that appears at the bottom when a WebKit text field is focused
I have an iOS app running on Mac (it's not running through Catalyst, it's the iOS app on Mac). It displays some web content, along with some inputs. I'd like to know how to disable that dark grey bar ...
0
votes
0
answers
68
views
WKWebView PDF Export Adds Unexpected White Space at Top
I'm using WKWebView in iOS to render HTML and then export it as a PDF using UIPrintPageRenderer. However, when I generate the PDF, there's a small white space at the top of the page that I can't seem ...
1
vote
1
answer
96
views
WKWebView subclass crashes with EXC_BREAKPOINT in URL.unconditionallyBridgeFromObjectiveC when calling loadHTMLString from Swift
Crash
The crash happens immediately when loadHTMLString is called, even though baseURL is nil.
Here’s the Swift call site:
let webView = MYWKWebView(frame: .zero, configuration: WKWebViewConfiguration(...
2
votes
0
answers
75
views
Forge Viewer offline in Vue/Vite (iOS WebView) – call function across files without import/window/globalThis
We are building an offline Forge Viewer project using Vue + Vite, which will later be wrapped in an iOS app (Capacitor).
In offline mode, we need to serve model files and translations from a local ...
1
vote
0
answers
175
views
TikTok player inside an iOS web view: How to handle cookie consent?
We have a mobile app that uses WkWebView on iOS. We want to embed TikTok videos here.
The issue is that the TikTok player always shows its Cookie consent popup, which won't even go away if the user ...
1
vote
0
answers
131
views
How does Branch.io successfully deep link from Chrome iOS when custom domains fail?
How does Branch.io successfully deep link from Chrome iOS when custom domains fail?
I'm facing a frustrating issue with deep links on Chrome iOS that Branch.io somehow manages to solve perfectly, and ...
1
vote
1
answer
3k
views
How to prevent iOS 26 WKWebView Liquid Glass toolbar from overlapping a fixed bottom tab switcher?
I’m testing my web app inside in-app WKWebViews (Discord, Telegram, custom apps, etc.) on iOS 26.x.
Apple introduced a new Liquid Glass floating toolbar at the bottom of webviews, and it overlaps my ...
-1
votes
2
answers
825
views
Under iOS 26 system, screenshots within the code cannot capture the content of the WKWebView [closed]
This is the screenshot of the code. The view content includes UIView and WKWebView. The part of UIView is normal, but the part of WKWebView shows a blank screen. This was not a problem before iOS 26, ...
0
votes
0
answers
50
views
VisionOS: WKWebView stops rendering after WindowGroup is closed
I'm building a visionOS app where users can place canvases into the 3D environment. These canvases are RealityKit entities that render web content using a WKWebView. The web view is regularly ...
1
vote
1
answer
403
views
iOS 26 web page with script is terminated on custom scheme WKURLSchemeHandler
Update (06.08.2025): Fixed in iOS beta 5
Something has changed in iOS 26 (tested on beta 4) and now if custom scheme is used and web page contains script element then WebKit is terminated with ...
0
votes
1
answer
43
views
Using inline Web Workers with importScripts in Cordova
For a number of years I have been using inline web workers in Cordova using the cordova-plugin-ionic-webview on iOS which when a web worker is launched provides a self.location. I wanted for ...
0
votes
0
answers
42
views
When an input on an iOS 18 H5 page is focused, the prompt "Slide your finger to spell words quickly as you type" appears every time
When an field in an H5 page loaded by a WKWebView in an iOS development project is tapped to gain focus, a keyboard pop-up appears with a prompt for "slide-to-type" ("Slide your finger ...
4
votes
1
answer
2k
views
WKWebView blur under UINavigationBar on iOS 26
I'm developing an iOS app that uses a WKWebView to render a PWA basically. Since updating to the iOS 26 developer preview featuring the new Liquid Glass interface, I’ve noticed a subtle blur at the ...
1
vote
0
answers
66
views
iOS createPDF from WKWebView shows black background for SVG elements
WKWebView has a createPDF function:
https://developer.apple.com/documentation/webkit/wkwebview/createpdf(configuration:completionhandler:)
It works fine for everything except SVG elements on the page. ...
0
votes
1
answer
76
views
SwiftUI animation causes WkWebView pointer to flicker
I have two a WkWebView with an embedded YouTube player and a counter underneath that updates at a certain interval with a small animation. Every update causes the cursor to flicker back and forth ...
1
vote
1
answer
102
views
WkWebView keeps playing after closing window
To reproduce:
Build & launch the App
Keep the App in dock to launch it again later
Quit the App
Open from dock
Click on "x" to close the window
→ Audio keeps playing
The issue happens ...
0
votes
0
answers
120
views
How to persist multiple WhatsApp Web sessions inside SwiftUI app?
I'm building a SwiftUI app that lets users run multiple WhatsApp Web sessions, each tied to a different phone number, using WKWebView.
My goal:
Load https://web.whatsapp.com inside a WKWebView
Support ...
1
vote
0
answers
103
views
IOS WKWebview pops up native video player even if I mention playsinline
I have a flutter web app which plays video as a background.
As flutter video player by defaults has the attribute playsinline, the wkwebview should not be opening the native video player with controls....
1
vote
1
answer
238
views
How to get HTML from a cross origin iframe using WKWebView?
I am writing a GUI web scraper for macOS, where a user can browse the web using a WKWebView and can use various buttons and text fields to extract their desired content.
Right now, my approach is to ...
0
votes
0
answers
24
views
WKWebView / Safari iPad9 Camera auto potrait
I found that the code we use to get camera capture in ipad has different behavior and result in ipad9 generation. The simple code navigator.mediaDevices.getUserMedia() and show it in <video> ...
0
votes
0
answers
25
views
How to remove default print margins when printing WKWebView to PDF on iOS? [duplicate]
I'm trying to generate a PDF from a WKWebView on iOS using UIPrintInteractionController. The goal is to create a PDF without any default margins (full-bleed content, if possible).
Here is my current ...
0
votes
0
answers
65
views
wkwebview's webView:decidePolicyForNavigationAction:decisionHandler not called after wkwebview's loadrequest was called, can't reproduce locally
My app use wkwebview a lot, and I got a feedback from my app's user that my app's webview sometimes cant load web normally, which means after wkwebview loadrequest, no content was shown, all you can ...
0
votes
1
answer
90
views
CSS page margins ignored in WKWebView while printing on iOS?
I am trying to print an HTML document from a WKWebView in an iOS app. The document includes the following CSS to remove the page margins:
<style id="page-print-style">
@page {
size:...
0
votes
1
answer
648
views
WKwebview does not allow video being played in the background
I’ve been working on a personal iOS project for fun — essentially a YouTube music player, learning how background media playback works in native iOS apps.
After seeing that Musi (a famous music ...
0
votes
0
answers
33
views
When did ServiceWorker support arrive in Chrome for iOS
AFAIK as late as 2020 service worker support in WKWebView for non-Safari apps did not exist.
As best I can tell it's working fine today.
I cannot figure out though when this landed in what version of ...
0
votes
1
answer
147
views
iOS WKWebView's addUserScript does not work first time for "about:blank"
I am able to demonstrate my issue using the below simple example.
I basically need to use the addUserScript to load different scripts based upon which website the web view has navigated to. This works ...
0
votes
1
answer
211
views
Where is the iOS WKWebView Camera integration enabled?
I have tried the code and options in the answers here iOS WKWebview: Always allow camera permission
to make a webcam integration in Javascript as usual.
I still can't get it to work - console log ...
1
vote
0
answers
205
views
iOS WKWebView Background Audio Crashes with RBSServiceErrorDomain Code=1 (WebKit Assertion Failed) Despite Audio Background Mode
I'm developing an iOS app that primarily uses a WKWebView to display web content which includes HTML5 elements for playing radio streams. I need these streams to continue playing when the app goes ...
0
votes
0
answers
234
views
How to send a cookie in ionic ios (capacitor, wkwebview)
I am having unbelievable trouble trying to do something as simple as sending a cookie...
I have a regular ionic app which runs perfectly on web and android but on ios (simulator) it seems to build and ...
1
vote
1
answer
52
views
WKWebview/UIViewRepresentable - Hide Loading... text while webview is loading
I have the following UIViewRepresentable to load a webview.
struct SViewerWebView: UIViewRepresentable{
var url: String
var token: String
@Binding var isLoading: Bool
func ...
0
votes
1
answer
117
views
How to get webView didFail called
I am working on a wrapper for WKWebView and want to make sure I handle possible errors.
How can I make WKNavigationDelegate's method
func webView(_: WKWebView, didFail _: WKNavigation!, withError ...
1
vote
0
answers
156
views
WKWebsiteDataStore init(forIdentifier:)
I am currently working with a custom WKWebsiteDataStore by using the init method to create it with UUIDs. According to the documentation, this provides persistent storage that is suitable for ...
0
votes
1
answer
36
views
How do I get a click reported in WKWebView? [closed]
I'm late, I know. But now I have to update an old app in objective c and replace UIWebView with WKWebView. That's largely done and works fine – with one exception:
I have to react to clicked links. ...
4
votes
2
answers
511
views
Prevent iOS from Switching Between Back Camera Lenses in getUserMedia (Safari/WebView, iOS 18)
I’m developing a hybrid app (WebView / Turbo Native) that uses getUserMedia to access the back camera for a PPG/heart rate measurement feature (the user places their finger on the camera).
Problem:
...
3
votes
1
answer
292
views
Enable Picture-in-Picture for WKWebView on macOS
On iOS, I can set allowsPictureInPictureMediaPlayback of a WKWebViewConfiguration to true to enable Picture-in-Picture. According to the documentation, this property isn't available on macOS.
Is there ...
1
vote
1
answer
613
views
WKWebView not loading YouTube videos in iOS app
I am developing an iOS app in which I want to show YouTube videos. This is my code
struct YouTubeView: UIViewRepresentable {
let videoID: String
func makeUIView(context: Context) -> ...
0
votes
0
answers
269
views
Unable to Specify File Types in WKWebView Using runOpenPanelWithParameters on macOS
I am write a wkwebview application in macos where I want to enable file upload to my website loaded in wkwebview.
I found few articles telling to use runOpenPanelWithParameters which runs for me but I ...
1
vote
1
answer
645
views
How to color safe areas black in Capacitor iOS (WKWebView)?
I'm trying to color the safe areas (notch area, home indicator) black in my Capacitor iOS app. The app uses WKWebView under the hood.
However, I'm still seeing white safe areas in the WKWebView, ...
0
votes
0
answers
76
views
When WKWebView is inactive in iOS, settimeout cant work
When A WebViewController push B WebViewController, the settimeout function in A WebViewController will be stop working until returning to A WebViewController.
On a PC, switching tabs in a WebView does ...
0
votes
1
answer
140
views
IOS Swift WKUIDelegate methods not called (Xcode 16)
I encountered a problem where my app, which worked perfectly in July, no longer works when I try to build it now.
Certain methods, such as the one below, are no longer being called in Xcode 16.1.
func ...
0
votes
0
answers
97
views
URL in iOS app to open in popup window for login
I'm having an issue where I can't get just a specific url to open in a popup window just for login purposes. The app I have is a webview app.
Here is the code below:
import UIKit
import WebKit
class ...
2
votes
0
answers
56
views
I want to download files stored in Google Drive on WKWebView
I am creating an iOS application in Swift.
Downloading does not start when the “Download” button is pressed.
import UIKit
import WebKit
class ViewController: UIViewController, WKNavigationDelegate, ...
0
votes
2
answers
253
views
How to use both loadFileURL(_:allowingReadAccessTo:) and loadHTMLString(_:baseURL:) in iOS?
My local html file contains remote resources with relative path.
And, I need to use local path resources.(specific local directory's contents)
To fulfill No.1 needs, I can use loadHTMLString(_:...
1
vote
1
answer
2k
views
KMP Build using WKWebView is `missing entitlements`
I'm using Kotlin Multiplatform to generate a WebView in my iosMain implementation:
@Composable
actual fun LoadUrl(url: String) {
val webView = remember { WKWebView() }
UIKitView(
factory = {
...