Hello everyone,
I am currently working on integrating a WebView into my macOS application, intended to allow users to browse tutorial webpages directly within the app.
Although I’ve followed an example that appears syntactically correct, the WebView does not render any webpage content.
Below is a code snippet for reference:
import SwiftUI
import WebKit
struct HelpWebView: View {
@State private var toggle = false
@State private var page = WebPage()
private var url: URL {
toggle
? URL(string: "https://www.webkit.org")!
: URL(string: "https://www.swift.org")!
}
var body: some View {
WebView(page)
.onAppear {
page.load(URLRequest(url: url))
}
.onChange(of: toggle) {
page.load(URLRequest(url: url))
}
.toolbar {
Button("Reload", systemImage: "arrow.clockwise") {
toggle.toggle()
}
}
}
}
I would greatly appreciate any insights or suggestions on what might be causing this issue or how to resolve it.
Thank you in advance for your help!
Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have an iOS app that generates and renders a custom HTML document inside a UIWebView.
After updating a device to iOS 26, the same HTML is rendered with noticeably smaller fonts compared to previous iOS versions.
No code or HTML changes were made.
Context
HTML is generated dynamically and rendered in a UIWebView
The HTML is embedded inside a custom XML wrapper
The issue happens only on iOS 26
Earlier iOS versions render the font size correctly
Hello, why is Safari blocking my domains? https://fitgel.ru https://fittoma.ru https://ohota.pro There are no errors in them, other browsers respond normally.
Topic:
Safari & Web
SubTopic:
General
Hello everyone,
I am currently working on integrating a WebView into my macOS application, intended to allow users to browse tutorial webpages directly within the app.
Although I’ve followed an example that appears syntactically correct, the WebView does not render any webpage content.
Below is a code snippet for reference:
import SwiftUI
import WebKit
struct HelpWebView: View {
@State private var toggle = false
@State private var page = WebPage()
private var url: URL {
toggle
? URL(string: "https://www.webkit.org")!
: URL(string: "https://www.swift.org")!
}
var body: some View {
WebView(page)
.onAppear {
page.load(URLRequest(url: url))
}
.onChange(of: toggle) {
page.load(URLRequest(url: url))
}
.toolbar {
Button("Reload", systemImage: "arrow.clockwise") {
toggle.toggle()
}
}
}
}
I would greatly appreciate any insights or suggestions on what might be causing this issue or how to resolve it.
Thank you in advance for your help!
I am using the native SwiftUI WebView and WebPage APIs (iOS 26+) and would like to implement file download functionality using the native SwiftUI WebView. However, I have not been able to find any APIs equivalent to WKDownload.
In WKWebView, the WKDownload API can be used to handle downloads. I am looking for a similar API or recommended approach in the native SwiftUI WebView that would allow downloading files.
If anyone has guidance or suggestions on how to implement this, I would appreciate your help.
Expected Behavior:
Display the digit “6”.
Actual Behavior:
The rendered character appears as a composite glyph—the left half resembles “9” and the right half resembles “6”, resulting in a malformed digit.
other examples:
Environment & Characteristics:
Occurs intermittently on iPhone 15 Pro Max and iPhone 16 Pro Max.
Reproducible within the Taobao App, specifically in WKWebView.
Font Used:
AlibabaSans102_v1_TaoBao-Bd.ttf
I’m currently developing an application using WKWebView.
After updating to iOS 26.2 Developer Beta, the following Web API started returning false:
isUserVerifyingPlatformAuthenticatorAvailable
MDN: https://developer.mozilla.org/ja/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static
This issue did not occur on iOS 26.1 — it only happens on the beta version.
Has anyone else encountered this problem or is aware of any related changes?
OS: iOS 26.2 beta 3 (23C5044b)
I'm in the process of supporting Apple Pay through a 2nd payment gateway for some users, so I need to support two separate Apple Pay relationships. Both require their own apple-developer-merchantid-domain-association. I don't see how I can have both files for the one domain. Is this possible? Is there a workaround other than just replacing the old file with the new one and hoping that doesn't disrupt anything. That seems to be the approach taken by others (https://developer.apple.com/forums/thread/695538) but it is too high risk for me without any confirmation from Apple that this is ok. I'd also like to avoid having to setup a 2nd domain for these customers, since the current domain is already quite embedded in their operations.
We're trying to implement Cross-domain session check for SSO by making CORS request.
is Intelligent Tracking Prevention blocks all cookies in CORS requests?
I saw all cookies are blocked in CORS requests. We are not able to check the auth session in source domain.
Are there anyway to bypass this without user interaction?
benefitier.com -> source.com
In WKWebView, there is the WKUIDelegate method:
func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? {}
This delegate method provides a callback when a new window (for example, target="_blank") is requested in the web view.
However, in native SwiftUI (iOS 26), WebView / WebPage APIs do not provide an equivalent delegate method to handle new window requests.
As a workaround, I am using the following method:
public func decidePolicy(for action: WebPage.NavigationAction, preferences: inout WebPage.NavigationPreferences) async -> WKNavigationActionPolicy {}
In this method, when action.target == nil, I treat it as a new window request.
My question:
Is relying on action.target == nil in decidePolicy a reliable and future-safe way to detect new window requests in SwiftUI’s WebView, or is there a better or more recommended approach for handling target="_blank" / new window navigation in the SwiftUI WebView APIs?
Code:
public func decidePolicy(for action: WebPage.NavigationAction, preferences: inout WebPage.NavigationPreferences) async -> WKNavigationActionPolicy {
guard let webPage = webPage else { return .cancel }
// Handle case where target frame is nil (e.g., target="_blank" or window.open)
// This indicates a new window request
if action.target == nil {
print("Target frame is nil - new window requested")
// WORKAROUND: Until iOS 26 WebPage UI protocol is available, we handle new windows here
// Try to create a new WebPage through UI plugins
if handleCreateWebPage(for: webPage, navigationAction: action) != nil {
// Note: The new WebPage has been created and published to the view
return .allow
}
}
return .allow
}
When using iCloud Keychain passkeys with WebAuthn (mediation: "conditional") in non-Safari browsers (e.g. Chrome or WKWebView-based browsers), Face ID / Touch ID is requested twice during Passkey Autofill.
This issue occurs only when the focused input field shows a numeric keypad–style keyboard, such as:
Japanese Kana
Chinese Zhuyin
With a standard QWERTY keyboard, authentication completes with a single user verification.
Notably:
Safari completes authentication with one Face ID / Touch ID prompt even with numeric keypad keyboards.
Other browsers require two prompts.
The issue does not occur with other credential managers (Google Password Manager, 1Password), suggesting this is specific to iCloud Keychain.
This issue has been confirmed on the following OS versions:
iOS 17.6.1
iOS 18.7.2
iOS 26.2
iOS 26.3 beta
Impact
This behavior results in a confusing and unintuitive login experience for users relying on Passkey Autofill.
Steps to Reproduce:
Go to Settings → Keyboards → Keyboards, and set “Japanese – Kana” as the primary keyboard.
Enable Face ID / Touch ID, and make sure “Use Face ID / Touch ID For” → “Password Autofill” is enabled.
Open Chrome and navigate to https://webauthn.io.
Enter a username and tap “Register” to create a passkey using iCloud Keychain.
Tap the username field again so that the “Japanese – Kana” keyboard appears and the passkey suggestion created in step 4 is shown.
Tap the passkey suggestion.
Face ID / Touch ID is requested twice.
===
This issue has already been reported via Feedback Assistant as FB21726047. I am posting here to confirm whether this behavior is working as intended or represents a bug, and to make other developers aware of the current behavior.
The crash is specific to iOS 26.2 prior versions working fine.
WKScriptMessageHandler delegate func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage)
Name attribute is accessible but WKScriptMessage body attribute causes crash
The object seems to be not accessible(not in memory)
self.webkit.configuration.userContentController.add(self, name: "sampleHandler")
self.webkit.load(request)
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
print(message.name) // works print(message.body) // crashes
}
This demonstrates an issue with SwiftUI's WebView on iPadOS.
To repro, testing on iPad Simulator OS 26.2, macOS 26.2, Xcode 26.2.
Download and unzip this project: https://drive.google.com/file/d/1z3MobjDf_RvvOtriXtinXvrJ7rGHwZRs/view?usp=share_link
Set up Signing and Run the swiftui-webview App target on simulator (I'm using iPad Pro 13-inch (M5 simulator)
Tap/click the fullscreen [ ] button in the bottom left corner of the webpage.
Tap/click the 'X' button in the top left, to exit fullscreen.
Result: The WebView exits fullscreen, but there is no content loaded, just a white background.
It's also now not possible to visit other URLs - the WebView appears to be unresponsive and not repaint.
This does not appear to affect macOS 26.2, just iPadOS.
Our app uses ASWebAuthenticationSession for login.
This launches an incognito (ephemeral) browser window of the system’s default browser with the authentication URL.
Recently, on the latest macOS Tahoe, we observe that:
The browser application is launched(we could see in the dock)
But the authentication window with the URL does not appear
No error is returned to the app (silent failure)
Issue:
On Safari, two Smart App Banners appear for the same webpage when the iOS app is installed.
Cause:
• Banner 1: Native Apple Smart App Banner, automatically triggered by Safari via AASA / Universal Links.
• Banner 2: Smart banner injected by a third-party SDK (Branch.io).
• Both operate independently, resulting in duplicate banners.
Finding:
Safari’s native Smart App Banner behavior is system-controlled and cannot be disabled programmatically using web rules or JavaScript while Universal Links are enabled.
Question:
Is this behavior expected by design?
Is there any Apple-supported way to suppress the native Smart App Banner when using a third-party banner, or is the recommended approach to rely on only one banner system?
Hi Apple engineers!
We are making an iOS browser and are planing to deliver a feature that allows enterprise customers to use a MAM key to set a PAC file for proxy. It's designed to support unmanaged device so the MDM based solutions like 'Global HTTP Proxy MDM payload' or 'Per-App VPN' simply don't work.
After doing some research we found that with WKWebView, the only framework allowed on iOS for web browsing, there's no API for programmatically setting proxy. The closes API is the WKURLSchemeHandler, but it's for data management not network request interception, in other word it can not be used to handle HTTP/HTTPS request well.
When we go from the web-view level to the app level, it seems there's no API to let an app set proxy for itself at an app-level, the closest API is Per-App VPN but as mentioned above, Per-App VPN is only available for managed device so we can't use that as well.
Eventually we go to the system level, and try to use Network Extension, but there's still obstacles. It seems Network Extension doesn't directly provide a way to write system proxy. In order to archive that, we may have to use Packet Tunnel Provider in destination IP mode and create a local VPN server to loop back the network traffic and do the proxy stuff in that server. In other word, the custom VPN protocol is 'forward directly without encryption'. This approach looks viable as we see some of the network analysis tools use this approach, but still I'd like to ask is this against App Store Review Guidelines?
If the above approach with Network Extension is not against App Store Review Guidelines, I have a further question that, what is the NEProxySettings of NETunnelNetworkSettings for? Is it the proxy which proxies the VPN traffic (in order to hide source IP from VPN provider) or it is the proxy to use after network traffic goes into the virtual private network?
If none of the above is considered recommended, what is the recommended way to programmatically set proxy on WKWebView on an unmanaged device (regardless of where the proxy runs, web-view/app/system)?
Starting with iOS 26.2, when Safari tabs are set to Bottom or Compact view, some pages are not rendering properly. The error does not occur in Top view.
For some pages, scrolling causes rendering to be very slow, causing the user to experience page breaks and missing parts. If the user waits a few seconds, the missing parts of the page will appear, but the issue will reoccur when scrolling further. We have tested this on all available iOS devices and the issue occurs on all iPhones running iOS 26.2. The issue does not occur on iOS 26.1, and we have not experienced it on devices running iOS 18.
The issue can be reproduced on the following pages with an iPhone running iOS 26.2:
https://fotosakademia.hu/products/course/fotografia-kozephaladoknak-haladoknak
https://oktatas.kurzusguru.hu/products/course/az-online-kurzuskeszites-alapjai
There appears to be a regression or restriction in iOS 26.2 and 26.2.1 regarding the Web Authentication API in third-party browsers (browsers other than Safari).
Specifically, the method PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() returns false when called from within non-Safari browsers (e.g., Chrome, Firefox, Edge) on iOS, even when the device supports biometrics (FaceID/TouchID) and Passkeys are enabled.
This prevents third-party browsers from correctly detecting Platform Authenticator availability, leading websites to hide Passkey login options or default to cross-device authentication flows instead of using the local device's biometric authenticator.
Environment:
OS: iOS 26.2, iOS 26.2.1
Device: iPhone 17
Browsers Tested: Chrome iOS and Firefox iOS
Steps to Reproduce:
Launch Safari on an iOS device running iOS 26.2+.
Navigate to https://www.passkeys-debugger.io/.
Observe that "Platform Auth" is highlighted in Green (true), indicating the device is eligible for passkey authentication.
Launch a non-Safari browser (e.g., Chrome or Firefox) on the same device.
Navigate to https://www.passkeys-debugger.io/.
Expected Results:
"Platform Auth" should be Green (true), matching the behavior in Safari, as the device possesses a built-in platform authenticator.
Actual Results:
"Platform Auth" is highlighted in Red (false).
Impact:
This discrepancy fragments the Passkey user experience on iOS. Users preferring third-party browsers are unable to utilize the seamless on-device biometric authentication that is available in Safari. It forces developers to implement complex fallbacks or results in users believing their device is incompatible with Passkeys.
When using iOS 26.2 (23C55) Safari, the following can occur.
The current tab (A) opens a new tab (B) via window.open(url, target, windowFeatures).
The user clicks the "back" button to close tab B, and returns to tab A.
Tab A attempts to open tab B again at a later point, using the same "target" as before, and fails (no window object is returned by window.open).
This bug only occurs when the target is the same as the previously closed tab (which was closed via the back button). If a new target is specified, the new tab opens as expected.
This bug is also limited to the back button. If the user manually closes tab B, then it can be re-opened by tab A using window.open using the same target as before.
When using passkeys stored in iCloud Keychain (Passwords app) via Passkey Autofill in browsers other than Safari, the userVerification parameter is ignored and user verification (UV) is not performed.
As a result, relying party servers that require userVerification = required fail validation because the UV flag is not set, causing passkey authentication to fail.
This issue occurs when the following setting is disabled:
Settings → Face ID & Passcode → Use Face ID For → Password AutoFill
The issue is reproducible only with the following combination:
Non-Safari browsers (e.g. Chrome)
Passkeys stored in iCloud Keychain (Passwords app)
Passkey Autofill
The issue does not occur in the following cases:
Safari with passkeys stored in any credential manager
Non-Safari browsers using credential managers other than iCloud Keychain
Steps to Reproduce:
Go to Settings → General → Autofill & Passwords, and enable the Passwords app under “Autofill From”.
Go to Settings → Face ID & Passcode → Use Face ID For, and disable “Password AutoFill”.
Open Chrome and navigate to https://webauthn.io
Enter a username and tap “Register” to create a passkey using the Passwords app (iCloud Keychain).
On webauthn.io, go to Advanced Settings → Authentication Settings, and set “User Verification” to “Required”.
Reload the page, tap the input field, and perform Passkey Autofill.
User Verification is not triggered, and “Authentication failed” is displayed on webauthn.io.
===
This issue has already been reported via Feedback Assistant as FB21756948.
I am posting here to confirm whether this behavior is working as intended or represents a bug, and to make other developers aware of the current behavior.