Hello,
After upgrading to macOS 26.2, I’ve noticed a significant performance regression when calling evaluateJavaScript in an iOS App running on Mac (WKWebView, Swift project).
Observed behavior
On macOS 26.2, the callback of evaluateJavaScript takes around 3 seconds to return.
This happens not only for:
evaluateJavaScript("navigator.userAgent")
but also for simple or even empty scripts, for example:
evaluateJavaScript("")
On previous macOS versions, the same calls typically returned in ~200 ms.
Additional testing
I created a new, empty Objective-C project with a WKWebView and tested the same evaluateJavaScript calls.
In the Objective-C project, the callback still returns in ~200 ms, even on macOS 26.2.
Question
Is this a known issue or regression related to:
iOS Apps on Mac,
Swift + WKWebView, or
behavioral changes in evaluateJavaScript on macOS 26.2?
Any information about known issues, internal changes, or recommended workarounds would be greatly appreciated.
Thank you.
Test Code Swift
class ViewController: UIViewController {
private var tmpWebView: WKWebView?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
setupUserAgent()
}
func setupUserAgent() {
let t1 = CACurrentMediaTime()
tmpWebView = WKWebView(frame: .zero)
tmpWebView?.isInspectable = true
tmpWebView?.evaluateJavaScript("navigator.userAgent") { [weak self] result, error in
let t2 = CACurrentMediaTime()
print("[getUserAgent] \(t2 - t1)s")
self?.tmpWebView = nil
}
}
}
Test Code Objective-C
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
NSTimeInterval startTime = [[NSDate date] timeIntervalSince1970];
WKWebView *webView = [[WKWebView alloc] init];
dispatch_async(dispatch_get_main_queue(), ^{
[webView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
NSTimeInterval endTime = [[NSDate date] timeIntervalSince1970];
NSLog(@"[getUserAgent]: %.2f s", (endTime - startTime));
}];
});
}
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
Hi, after upgrading MacOS (MB Air M1 Version 26.2 (25C56)) & Safari (Version 26.2 (21623.1.14.11.9)) to latest versions, we are experiencing a new bug occurring with our web extension (Click & Read) on local storage writing and getting this error :
Invalid call to browser.storage.local.set(). Disk I/O error.
This doesn't happen on other browsers (chromium, Firefox).
export const setLocalStorage = async (value: object) => {
try {
await browser.storage.local.set(value);
} catch (error) {
console.error("[Click & Read] Error setting local storage", error);
}
};
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 found that on iPhone 15 and later models, after upgrading to iOS 16.2, if a WKWebView's HTML page frequently receives large WebSocket data packets, it may trigger a rare bug: the already loaded WebView page can no longer establish network connections. Both HTTPS and WebSocket connections time out, and the network in the entire app becomes unusable. Even creating a new WebView instance to load a new page fails—it stays blank. Reloading a previously loaded WebView also results in a blank screen. (call [webview reload])Currently, the only solution when this happens is to restart the app.
Reproduction environment:
iPhone 15 and later models, iOS 26.2, cellular data (not reproducible on Wi-Fi)
Log situation:
When the blank screen occurs, the webViewWebContentProcessDidTerminate callback is not triggered. When creating a new webview instance and reloading a page during reproduction, only the didStartProvisionalNavigation callback is triggered, and no failure callbacks in Navigation are triggered.
Topic:
Safari & Web
SubTopic:
General
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.
aID is an ID service for 150+ newspaper sites in Norway. Since the middle of January the average login time with passkeys on our site https://www.aid.no/ has increased for Safari users, the number of logins using passkey in Safari has decreased dramatically.
Previously Safari was the browser that provided the best user experience during login, since it triggered fingerprint reader straight away, but this behavior has vanished. Has something changed that we should be aware of, and is there something we can do to make conditional get great again?
Without mediation conditional, the passkeys work as expected. In Chrome and Firefox, we get passkey suggestions in the username field, in Safari it's only password suggestions.
To make things even stranger, the same code works as it used to in our test environment. It triggers a small popup by the username field and activates the fingerprint reader. If I cancel this, I can click on the Passwords icon and get passkey suggestion there.
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.
Hello Apple Developer Community,
I currently have a Safari Web Extension on iOS that blocks certain URLs for users. I would like to provide the same functionality for Chrome on iOS.
I understand that Chrome on iOS uses WebKit under the hood, and Safari Web Extensions can run in Safari, but I am unsure whether there is any way to implement URL blocking in Chrome for iOS—either via an extension, API, or other supported mechanism.
Specifically, I’m looking for guidance on:
Whether any browser extension (Safari, Chrome, or otherwise) can intercept or block web requests in Chrome on iOS.
If not, what Apple-supported alternatives exist for implementing URL-blocking functionality for users of Chrome on iOS.
Any best practices for maintaining a cross-browser URL-blocking solution for iOS users.
I want to make sure my approach is aligned with Apple’s policies and platform capabilities. Any guidance or official references would be greatly appreciated.
Thank you!