I'm trying to download mods for Stardew Valley, before the beta it worked but now it doesn't. Is there anyone who can help to fix this? Used Firefox and Safari as well as Safari on my ipad.
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
This post is an effort to draw attention to a regression in Tahoe that has a large impact on our app. This bug was filed during seed 3 but remains open:
FB18869578: Regression: WebView fails to render fonts registered with CTFontManagerRegisterFontURLs or ATSApplicationFontsPath
The gist of it is that WKWebView fails to render text that is styled with a “font-family” that references a font that has been loaded into the app using either the ATSApplicationFontsPath Info.plist key or loaded dynamically with CTFontManagerRegisterFontURLs. The area where the text should be is just blank.
There is more detail and a reproducer in the bug referenced above. We really hope this bug can get fixed before GA.
If anyone else would like to try and reproduce it, you can download a test case from here: https://e3supportuploads.s3-accelerate.amazonaws.com/8739959ce24de40fa462798a532aaa99fbfc9affba4f2a3e71d397f9e30d2604
Topic:
Safari & Web
SubTopic:
General
How did you test apple-app-site-association in non-production environments that are usually not public?
Topic:
Safari & Web
SubTopic:
General
Environment
• Device: iOS 26 Developer Beta 5 (23A5308g)
• Xcode: 16.3
Short description
The app crashes the moment the user tries to long-press to select text inside a WKWebView, double-tap an image with Text (magnifier appears)
The exception is CALayer position contains NaN. frame = (nan,0;0,48) chorPoint=(inf, 0) and it is thrown in the UI process.
Build & run any project that hosts a WKWebView. Inject the following CSS via script (this is what we do to suppress the native callout menu):
WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.bounds
configuration:[WKWebViewConfiguration new]];
NSString *js =
@"document.documentElement.style.webkitUserSelect='none';"
"document.documentElement.style.webkitTouchCallout='none';";
[webView evaluateJavaScript:js completionHandler:nil];
[self.view addSubview:webView];
Incident Identifier: EE6FB046-5087-4F15-A72D-A74965347A30
CrashReporter Key: 29e8e58e02a07557adb4ce3f463d764f3ce8bbd5
Hardware Model: iPhone16,1
Process: wallet [642]
Path: /private/var/containers/Bundle/Application/4B4E609A-C8BF-4C56-AB2A-1638249B98A5/wallet.app/wallet
Identifier: xxxx
Version: xxxx
AppStoreTools: 16F7
AppVariant: 1:iPhone16,1:18
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: xxxxx
Date/Time: 2025-08-06 12:05:24.0732 +0800
Launch Time: 2025-08-06 11:49:40.3802 +0800
OS Version: iPhone OS 26.0 (23A5308g)
Release Type: Beta
Baseband Version: 3.02.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: wallet [642]
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
0 CoreFoundation 0x185e058c8 __exceptionPreprocess + 164
1 libobjc.A.dylib 0x182d797c4 objc_exception_throw + 88
2 CoreFoundation 0x185e908d4 -[NSException initWithCoder:] + 0
3 QuartzCore 0x18678a874 CA::Layer::set_position(CA::Vec2<double> const&, bool) + 160
4 QuartzCore 0x1869a7270 -[CALayer setPosition:] + 52
5 UIKitCore 0x18c4ac564 -[UIView _backing_setPosition:] + 176
6 UIKitCore 0x18cefdf0c -[UIView setCenter:] + 220
7 UIKitCore 0x18cd9f794 -[_UIEditMenuContentPresentation _displayPreparedMenu:titleView:reason:didDismissMenu:configuration:] + 936
8 UIKitCore 0x18cd9f3c0 __54-[_UIEditMenuContentPresentation _displayMenu:reason:]_block_invoke + 104
9 UIKitCore 0x18ced1060 -[UIEditMenuInteraction _editMenuPresentation:preparedMenuForDisplay:completion:] + 384
10 UIKitCore 0x18cd9f2e4 -[_UIEditMenuContentPresentation _displayMenu:reason:] + 304
11 UIKitCore 0x18cd9f0d8 -[_UIEditMenuContentPresentation displayMenu:configuration:] + 64
12 UIKitCore 0x18ced0344 __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 260
13 UIKitCore 0x18ced1f8c __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 80
14 UIKitCore 0x18cc8403c __109-[UITextContextMenuInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 180
15 UIKitCore 0x18cc84584 __107-[UITextContextMenuInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:]_block_invoke + 148
16 WebKit 0x1a05ae5d4 WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>::operator()(WebKit::DocumentEditingContext&&) + 64
17 WebKit 0x1a05bb468 WTF::Detail::CallableWrapper<WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebPage::RequestDocumentEditingContext, WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>>(WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&, WTF::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*), void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 196
18 WebKit 0x19fcf5db8 WTF::Detail::CallableWrapper<WebKit::AuxiliaryProcessProxy::sendMessage(WTF::UniqueRef<IPC::Encoder>&&, WTF::OptionSet<IPC::SendOption>, std::__1::optional<IPC::ConnectionAsyncReplyHandler>, WebKit::AuxiliaryProcessProxy::ShouldStartProcessThrottlerActivity)::$_1, void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 64
19 WebKit 0x19fce54f0 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) + 340
20 WebKit 0x19fcf5aa0 IPC::Connection::dispatchIncomingMessages() + 536
21 JavaScriptCore 0x19a8f85d4 WTF::RunLoop::performWork() + 552
22 JavaScriptCore 0x19a8f838c WTF::RunLoop::performWork(void*) + 36
23 CoreFoundation 0x185da6230 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
24 CoreFoundation 0x185da61a4 __CFRunLoopDoSource0 + 172
25 CoreFoundation 0x185d83c6c __CFRunLoopDoSources0 + 232
26 CoreFoundation 0x185d598b0 __CFRunLoopRun + 820
27 CoreFoundation 0x185d58c44 _CFRunLoopRunSpecificWithOptions + 532
28 GraphicsServices 0x224ce0498 GSEventRunModal + 120
29 UIKitCore 0x18b6c84b8 -[UIApplication _run] + 792
30 UIKitCore 0x18b66cbc0 UIApplicationMain + 336
31 wallet 0x1046f8558 0x1046f4000 + 17752
32 dyld 0x182dcdb18 start + 6332
Environment
• Device: any iPhone running iOS 26 Developer Beta 5 (23A5308g)
• Xcode: 16.3
Short description
The app crashes the moment the user tries to long-press to select text inside a WKWebView, double-tap an image with Text (magnifier appears)
The exception is CALayer position contains NaN. frame = (nan,0;0,48) chorPoint=(inf, 0) and it is thrown in the UI process.
Build & run any project that hosts a WKWebView. Inject the following CSS via script (this is what we do to suppress the native callout menu):
WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.bounds
configuration:[WKWebViewConfiguration new]];
NSString *js =
@"document.documentElement.style.webkitUserSelect='none';"
"document.documentElement.style.webkitTouchCallout='none';";
[webView evaluateJavaScript:js completionHandler:nil];
[self.view addSubview:webView];
Incident Identifier: EE6FB046-5087-4F15-A72D-A74965347A30
CrashReporter Key: 29e8e58e02a07557adb4ce3f463d764f3ce8bbd5
Hardware Model: iPhone16,1
Process: wallet [642]
Path: /private/var/containers/Bundle/Application/4B4E609A-C8BF-4C56-AB2A-1638249B98A5/wallet.app/wallet
Identifier: xxxxxxx
Version: xxxx
AppStoreTools: 16F7
AppVariant: 1:iPhone16,1:18
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: xxxxxx
Date/Time: 2025-08-06 12:05:24.0732 +0800
Launch Time: 2025-08-06 11:49:40.3802 +0800
OS Version: iPhone OS 26.0 (23A5308g)
Release Type: Beta
Baseband Version: 3.02.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: wallet [642]
Triggered by Thread: 0
Application Specific Information:
abort() called
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x22da0f0cc __pthread_kill + 8
1 libsystem_pthread.dylib 0x1e097b7e8 pthread_kill + 268
2 libsystem_c.dylib 0x191361f1c abort + 124
3 libc++abi.dylib 0x182e7a808 __abort_message + 132
4 libc++abi.dylib 0x182e69484 demangling_terminate_handler() + 304
5 libobjc.A.dylib 0x182d7bf28 _objc_terminate() + 156
6 wallet 0x1068ff8c8 0x1046f4000 + 35698888
7 libc++abi.dylib 0x182e79bdc std::__terminate(void (*)()) + 16
8 libc++abi.dylib 0x182e7d314 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88
9 libc++abi.dylib 0x182e7d2bc __cxa_throw + 92
10 libobjc.A.dylib 0x182d7992c objc_exception_throw + 448
11 CoreFoundation 0x185e908d4 +[NSException raise:format:] + 128
12 QuartzCore 0x18678a874 CA::Layer::set_position(CA::Vec2<double> const&, bool) + 160
13 QuartzCore 0x1869a7270 -[CALayer setPosition:] + 52
14 UIKitCore 0x18c4ac564 -[UIView _backing_setPosition:] + 176
15 UIKitCore 0x18cefdf0c -[UIView setCenter:] + 220
16 UIKitCore 0x18cd9f794 -[_UIEditMenuContentPresentation _displayPreparedMenu:titleView:reason:didDismissMenu:configuration:] + 936
17 UIKitCore 0x18cd9f3c0 __54-[_UIEditMenuContentPresentation _displayMenu:reason:]_block_invoke + 104
18 UIKitCore 0x18ced1060 -[UIEditMenuInteraction _editMenuPresentation:preparedMenuForDisplay:completion:] + 384
19 UIKitCore 0x18cd9f2e4 -[_UIEditMenuContentPresentation _displayMenu:reason:] + 304
20 UIKitCore 0x18cd9f0d8 -[_UIEditMenuContentPresentation displayMenu:configuration:] + 64
21 UIKitCore 0x18ced0344 __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 260
22 UIKitCore 0x18ced1f8c __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 80
23 UIKitCore 0x18cc8403c __109-[UITextContextMenuInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 180
24 UIKitCore 0x18cc84584 __107-[UITextContextMenuInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:]_block_invoke + 148
25 WebKit 0x1a05ae5d4 WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>::operator()(WebKit::DocumentEditingContext&&) + 64
26 WebKit 0x1a05bb468 WTF::Detail::CallableWrapper<WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebPage::RequestDocumentEditingContext, WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>>(WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&, WTF::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*), void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 196
27 WebKit 0x19fcf5db8 WTF::Detail::CallableWrapper<WebKit::AuxiliaryProcessProxy::sendMessage(WTF::UniqueRef<IPC::Encoder>&&, WTF::OptionSet<IPC::SendOption>, std::__1::optional<IPC::ConnectionAsyncReplyHandler>, WebKit::AuxiliaryProcessProxy::ShouldStartProcessThrottlerActivity)::$_1, void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 64
28 WebKit 0x19fce54f0 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) + 340
29 WebKit 0x19fcf5aa0 IPC::Connection::dispatchIncomingMessages() + 536
30 JavaScriptCore 0x19a8f85d4 WTF::RunLoop::performWork() + 552
31 JavaScriptCore 0x19a8f838c WTF::RunLoop::performWork(void*) + 36
32 CoreFoundation 0x185da6230 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
33 CoreFoundation 0x185da61a4 __CFRunLoopDoSource0 + 172
34 CoreFoundation 0x185d83c6c __CFRunLoopDoSources0 + 232
35 CoreFoundation 0x185d598b0 __CFRunLoopRun + 820
36 CoreFoundation 0x185d58c44 _CFRunLoopRunSpecificWithOptions + 532
37 GraphicsServices 0x224ce0498 GSEventRunModal + 120
38 UIKitCore 0x18b6c84b8 -[UIApplication _run] + 792
39 UIKitCore 0x18b66cbc0 UIApplicationMain + 336
40 wallet 0x1046f8558 0x1046f4000 + 17752
41 dyld 0x182dcdb18 start + 6332
WKWebView has set the option to disable selection ("document. documentElement. style. webkitUserSelect='none ';") and long press ("document. documentElement. style. webkitTouchCallout='none';"). If there is text on one of the images in WebView, simply tap the image twice and then long press the text. The program will crash with the following error message:
0 CoreFoundation 0x185e058c8 __exceptionPreprocess + 164
1 libobjc.A.dylib 0x182d797c4 objc_exception_throw + 88
2 CoreFoundation 0x185e908d4 -[NSException initWithCoder:] + 0
3 QuartzCore 0x18678a874 CA::Layer::set_position(CA::Vec2<double> const&, bool) + 160
4 QuartzCore 0x1869a7270 -[CALayer setPosition:] + 52
5 UIKitCore 0x18c4ac564 -[UIView _backing_setPosition:] + 176
6 UIKitCore 0x18cefdf0c -[UIView setCenter:] + 220
7 UIKitCore 0x18cd9f794 -[_UIEditMenuContentPresentation _displayPreparedMenu:titleView:reason:didDismissMenu:configuration:] + 936
8 UIKitCore 0x18cd9f3c0 __54-[_UIEditMenuContentPresentation _displayMenu:reason:]_block_invoke + 104
9 UIKitCore 0x18ced1060 -[UIEditMenuInteraction _editMenuPresentation:preparedMenuForDisplay:completion:] + 384
10 UIKitCore 0x18cd9f2e4 -[_UIEditMenuContentPresentation _displayMenu:reason:] + 304
11 UIKitCore 0x18cd9f0d8 -[_UIEditMenuContentPresentation displayMenu:configuration:] + 64
12 UIKitCore 0x18ced0344 __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 260
13 UIKitCore 0x18ced1f8c __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 80
14 UIKitCore 0x18cc8403c __109-[UITextContextMenuInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 180
15 UIKitCore 0x18cc84584 __107-[UITextContextMenuInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:]_block_invoke + 148
16 WebKit 0x1a05ae5d4 WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>::operator()(WebKit::DocumentEditingContext&&) + 64
17 WebKit 0x1a05bb468 WTF::Detail::CallableWrapper<WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebPage::RequestDocumentEditingContext, WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>>(WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&, WTF::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*), void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 196
18 WebKit 0x19fcf5db8 WTF::Detail::CallableWrapper<WebKit::AuxiliaryProcessProxy::sendMessage(WTF::UniqueRef<IPC::Encoder>&&, WTF::OptionSet<IPC::SendOption>, std::__1::optional<IPC::ConnectionAsyncReplyHandler>, WebKit::AuxiliaryProcessProxy::ShouldStartProcessThrottlerActivity)::$_1, void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 64
19 WebKit 0x19fce54f0 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) + 340
20 WebKit 0x19fcf5aa0 IPC::Connection::dispatchIncomingMessages() + 536
Will the official version have this issue?
We use a direct link mechanism in our app that attempts to open the app if it's already installed; otherwise, it redirects the user to the App Store.
However, when the app is not installed, Safari displays an alert saying:
"Safari cannot open the page because the address is invalid."
This popup appears to be caused by attempting to open a custom URL scheme that doesn't resolve.
what is the recommendation from apple to have a smooth transition to our mobile App
Here’s a sample link we’re using:
https://new.oneclear.com/Asset/fe5f7fb6-205a-40f8-9efe-71678361aa2c?t=NTA0NQ==
Hello,
I am developing a website which starts a web worker using the js code:
const zarrWorker = new Worker('./zarr_file.js', { type: 'module' });.
The script 'zarr_file.js' is served from the same origin with Cross-Origin-Embedder-Policy: require-corp and Cross-Origin-Opener-Policy: same-origin and it is importing external modules through the import statement (e.g. import * as zarr from "https://cdn.jsdelivr.net/npm/zarrita/+esm";).
All the external modules are blocked by Safari with the error Worker load was blocked by Cross-Origin-Embedder-Policy, although I can see (by running curl on them) that they correctly set cross-origin-resource-policy: cross-origin`.
The same website works fine in Chrome and Firefox.
Is it a bug or is Safari implementing stricter policies? In the latter case what would be the solution?
While implementing Apple Maps into our web application, I have a scenario where I want to be able to drag and move some of my custom annotations around. While that is working, when "picking up" the annotation before dragging it, there is an animation which I believe is to represent the human interaction of picking up a pin from a map, I would like to cancel that animation and thought that would be possible by calling preventDefault() in the emitted long-press event, which the documentation states that annotations should emit if they are draggable. The thing is that I don't get this event to emit when long pressing an annotation. So I believe that I have found a bug.
It's in this paragraph in the documentation https://developer.apple.com/documentation/mapkitjs/handling-map-events#Respond-to-map-interaction-events
A long press occurs on the map outside an annotation. A long press may be the beginning of a panning or pinching gesture on the map. You can prevent the gesture from starting by calling the preventDefault() method of the event. Annotations need to be draggable to dispatch long-press events.
In anybody else experiencing this or do you see any clear fix for this? Maybe there is another way to cancel that "picking up the annotation for dragging" animation. I have seemed to try anything else.
We would appreciate it if you could provide the detailed flow of recurring payments and the unsubscribe process using the Apple Pay JS API, specifically in cases where the PSP decrypts the Apple Pay token before sending it to the payment gateway.
Thank you very much for your kind assistance.
We would like to confirm the unsubscribe flow related to recurring payment processing.
When a user unsubscribes, does your system send any notification to us?
If no notification is provided, we will not be able to detect the unsubscribe event and will continue to send recurring payment requests to the gateway periodically. Would this cause any issues?
We would appreciate it if you could share the specific unsubscribe flow with us.
Thank you in advance for your support.
An Administrator account is executing safaridriver --enable but it doesn't apply to other standard user accounts and standard accounts can't enable it directly. Is this expected behavior? How can standard users make use of safaridriver?
How can I make a background image take the entire screen in ios26?
I've tried position fixed, sticky, env() css variables but nothing worked. It does it when in PWA mode, but I would like to do so in the browser too.
Body:
Hi all,
I’m seeing a puzzling discrepancy in behavior between NSURLSession (with multipathServiceType = NSURLSessionMultipathServiceTypeInteractive) and WKWebView when the device is connected to a Wi-Fi SSID that has no internet (e.g., a hardware device’s AP). I have the Multipath entitlement properly enabled, and in this scenario:
NSURLSession requests automatically fall back to cellular and succeed (no user intervention, fast switch).
WKWebView loads fail or stall: the web content does not appear, and it seems like the web view is not using the cellular path even though the system network path becomes satisfied and real Internet reachability is confirmed.
Environment:
iOS version: (e.g., iOS 18.4)
Device: (e.g., iPhone 15 Pro)
Multipath entitlement: enabled in the app, using NSURLSessionMultipathServiceTypeInteractive
Connected SSID: hardware device Wi-Fi with no external internet
Expected fallback: automatic to cellular once the Wi-Fi has no internet, as observed with NSURLSession
What I’ve done / observed:
NSURLSession using Multipath works as expected:
NSURLSessionConfiguration *cfg = [NSURLSessionConfiguration defaultSessionConfiguration];
cfg.multipathServiceType = NSURLSessionMultipathServiceTypeInteractive;
NSURLSession *session = [NSURLSession sessionWithConfiguration:cfg];
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.apple.com/library/test/success.html"]];
NSURLSessionDataTask *task = [session dataTaskWithRequest:req completionHandler:^(NSData *data, NSURLResponse *resp, NSError *err) {
NSLog(@"NSURLSession result: %@, error: %@", resp, err);
}];
[task resume];
When connected to the device Wi-Fi (no external internet), the session quietly shifts to cellular and completes successfully.
WKWebView fails to load under the same conditions:
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.apple.com/library/test/success.html"]]];
The web view either shows a load failure or just hangs, even though lower-level monitoring reports that the network path is satisfied and real Internet connectivity is available.
Network path monitoring logic:
I use the C API nw_path_monitor to watch for nw_path_status_satisfied.
Once satisfied is observed, I perform a true connectivity check using nw_connection (e.g., connecting tohttps://www.apple.com/library/test/success.html) to verify that real Internet traffic can flow over cellular.
That check passes, confirming fallback to cellular, but WKWebView still does not load content. Meanwhile, NSURLSession requests in the same condition succeed immediately.
Sample logging trace:
[+] nw_path_status_satisfied=1, hasWiFi=1, hasCellular=1
[+] Internet connectivity test: ready (via nw_connection)
[-] WKWebView load failed / stalled
[+] NSURLSession request completed successfully
Questions:
Why does NSURLSession with the multipath service type seamlessly use cellular when the Wi-Fi has no internet, but WKWebView does not exhibit the same fallback behavior? Is WKWebView not honoring the system’s multipath fallback the same way? Does it use a different networking stack or ignore the multipath entitlement in this scenario?
Is there a supported way to force WKWebView to behave like NSURLSession here?
For example, can I bridge content through a multipath-enabled NSURLSession and inject it into WKWebView via a custom scheme?
Are there any WKWebView configuration flags, preferences, or policies that enable the same automatic interface switching?
Are there known limitations or documented differences in how WKWebView handles network interface switching, path satisfaction, or multipath compared to raw NSURLSession?
What I’ve ruled out / tried:
Verified the Multipath entitlement is included and active.
Confirmed network path is “satisfied” and that real Internet reachability succeeds before calling [webView loadRequest:].
Delayed the WKWebView load until after connectivity verification.
Observed that NSURLSession requests succeed under identical connectivity conditions.
Any insight into internal differences, recommended workarounds, or Apple-recommended patterns for making web content robust in a “Wi-Fi with no internet” + automatic fallback-to-cellular scenario would be greatly appreciated.
Thank you!
正文:大家好,
当设备连接到没有互联网的 Wi-Fi SSID(例如,硬件设备的 AP)时,我看到 NSURLSession(multipathServiceType = NSURLSessionMultipathServiceTypeInteractive)和 WKWebView 之间的行为存在令人费解的差异。我正确启用了多路径授权,在这种情况下:
NSURLSession 请求会自动回退到蜂窝网络并成功(无需用户干预,快速切换)。
WKWebView 加载失败或停滞:Web 内容未出现,即使系统网络路径得到满足并确认了真正的 Internet 可访问性,Web 视图似乎也没有使用蜂窝路径。
环境:
iOS 版本:(例如 iOS 18.4)
设备:(例如 iPhone 15 Pro)
多路径权利:在应用程序中启用,使用 NSURLSessionMultipathServiceTypeInteractive
连接的 SSID:硬件设备 Wi-Fi,无需外部互联网
预期回退:一旦 Wi-Fi 没有互联网,就会自动到蜂窝网络,如 NSURLSession 所观察到的那样
我做了什么/观察到什么:
使用多路径的 NSURLSession 按预期工作:NSURLSessionConfiguration *cfg = [NSURLSessionConfiguration defaultSessionConfiguration];cfg.multipathServiceType = NSURLSessionMultipathServiceTypeInteractive;NSURLSession *session = [NSURLSession sessionWithConfiguration:cfg];NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@“https://www.apple.com/library/test/success.html”]];NSURLSessionDataTask *task = [session dataTaskWithRequest:req completionHandler:^(NSData *data, NSURLResponse *resp, NSError *err) { NSLog(@“NSURLSession result: %@, error: %@”, resp, err); }];[任务简历];连接到设备 Wi-Fi(无外部 Internet)时,会话会悄悄地切换到手机网络并成功完成。
相同情况下WKWebView加载失败:[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@“https://www.apple.com/library/test/success.html”]]];Web 视图要么显示负载失败,要么只是挂起,即使较低级别的监视报告网络路径已满足并且真正的 Internet 连接可用。
网络路径监控逻辑:
我使用 C API nw_path_monitor来监视nw_path_status_satisfied。
一旦观察到满意,我就会使用nw_connection(例如,连接 tohttps://www.apple.com/library/test/success.html)执行真正的连接检查,以验证真实的互联网流量是否可以通过蜂窝网络流动。
该检查通过,确认回退到手机网络,但 WKWebView 仍不会加载内容。同时,相同条件下的 NSURLSession 请求会立即成功。
示例日志记录跟踪:[+] nw_path_status_satisfied=1, hasWiFi=1, hasCellular=1 [+] Internet 连接测试:准备就绪(通过 nw_connection) [-] WKWebView 加载失败/停滞 [+] NSURLSession 请求成功完成
问题:
为什么当 Wi-Fi 没有 Internet 时,具有多路径服务类型的 NSURLSession 无缝使用蜂窝网络,但 WKWebView 不表现出相同的回退行为?WKWebView 是否不以相同的方式接受系统的多路径回退?在这种情况下,它是否使用不同的网络堆栈或忽略多路径授权?
是否有一种受支持的方法可以强制 WKWebView 像 NSURLSession 一样运行?
例如,我是否可以通过启用多路径的 NSURLSession 桥接内容,并通过自定义方案将其注入 WKWebView?
是否有任何 WKWebView 配置标志、首选项或策略启用相同的自动接口切换?
与原始 NSURLSession 相比,WKWebView 处理网络接换、路径满意度或多路径的方式是否存在已知限制或记录在案的差异?
我排除/尝试过的:
已验证多路径授权是否包含且处于活动状态。
确认的网络路径“满足”,并且在调用 [webView loadRequest:] 之前,真正的 Internet 可访问性成功。
将 WKWebView 加载延迟到连接验证之后。
观察到 NSURLSession 请求在相同的连接条件下成功。
任何对内部差异、推荐的解决方法或 Apple 推荐的模式的见解,以使 Web 内容在“没有互联网的 Wi-Fi”+ 自动回退到蜂窝场景中变得健壮,我们将不胜感激。
谢谢!
Topic:
Safari & Web
SubTopic:
General
There is no plus button

We have written a PAC script that blocklists certain domains and whitelists others. We went to Settings > Network > Wi-Fi (the network we are using), then clicked on Details, and under Proxies, we added the PAC file URL in the Automatic Proxy Configuration section.
We tried hosting the PAC file both on localhost and on a separate HTTP server.
After saving the settings, we tested several URLs. The blocking and allowing behavior works correctly in all browsers except Safari.
Below is the PAC script we are using for your reference.
The script works as expected in browsers other than Safari.
This is how the PAC script URL looks:
http://localhost:31290/proxy.pac
function FindProxyForURL(url, host) {
var blacklist = new Set(["facebook.com", "deepseek.com"]);
var b_list = [...blacklist];
for (let i = 0; i < b_list.length; i++) {
let ele = b_list[i] + "*";
if (shExpMatch(host, ele) || shExpMatch(url, ele)) {
return "PROXY localhost:8086";
}
}
if (isIPBlocked(whitelist_subnet, hostIP)) {
return "PROXY localhost:8087";
}
if (isIPBlocked(blacklist_subnet, hostIP)) {
return "PROXY localhost:8086";
}
return "PROXY localhost:8080";
}
Our app, VitalSource Bookshelf, is an EPUB reader that uses a WKWebView to display book content.
The EPUB content format is XHTML and uses namespaces (for the epub:type declaration).
On beta 4, the webkit process repeatedly crashes when loading our content. The crash appears to be in the XML parser. Here's what's at the top of the stack trace:
0 WebCore 0x19166a878 WebCore::XMLDocumentParser::startElementNs(unsigned char const*, unsigned char const*, unsigned char const*, int, unsigned char const**, int, int, unsigned char const**) + 4968
1 libxml2.2.dylib 0x19c5a2bd0 xmlParseStartTag2 + 3940
2 libxml2.2.dylib 0x19c59e730 xmlParseTryOrFinish + 2984
3 libxml2.2.dylib 0x19c59d8e4 xmlParseChunk + 708
4 WebCore 0x191668ec8 WebCore::XMLDocumentParser::doWrite(WTF::String const&) + 636
5 WebCore 0x191665b78 WebCore::XMLDocumentParser::append(WTF::RefPtr<WTF::StringImpl, WTF::RawPtrTraits<WTF::StringImpl>, WTF::DefaultRefDerefTraits<WTF::StringImpl>>&&) + 304
6 WebCore 0x190105db0 WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter&, std::__1::span<unsigned char const, 18446744073709551615ul>) + 268
7 WebCore 0x190861c3c WebCore::DocumentLoader::commitData(WebCore::SharedBuffer const&) + 1488
8 WebKit 0x18e07ca3c WebKit::WebLocalFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, WebCore::SharedBuffer const&) + 52
9 WebCore 0x190869db4 WebCore::DocumentLoader::commitLoad(WebCore::SharedBuffer const&) + 228
10 WebCore 0x1909521e4 WebCore::CachedRawResource::notifyClientsDataWasReceived(WebCore::SharedBuffer const&) + 268
I was able to reproduce this in Safari on beta 4 just by opening the following trivial xhtml file from the file system - it does the same thing it does in our app, which is reloads and crashes several times, followed by the "A problem repeatedly occurred with..." error message.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="vst: http://vitalsource.com/"><head></head><body class="dash" epub:type="chapter" data-begin-o="0" data-begin-o2="0" data-begin-o3="0" data-o="0" id="eid1844" data-end-o="14703" data-end-o2="14703" data-end-o3="14703"><h2 class="title" data-o="0" id="eid1845" data-out="33"><span class="label" data-o="0" id="eid1846"><span class="label-inner"><b data-o="0" id="eid1847">CHAPTER X</b> </span></span>THE SUBMARINE COAL-MINES</h2></body></html>
I've also filed a feedback. But posting here just to raise the visibility - this is critical for us. I think it was introduced in beta 4; that's at least when we first noticed it. It was working in the earlier betas, I just don't remember if I tried beta 3 or not.
It happens on iOS, macOS, and iPadOS.
This has never been a problem in any earlier release of macOS / iOS.
Topic:
Safari & Web
SubTopic:
General
We are building a hybrid iOS app using Angular (web) rendered inside a WKWebView, hosted by a native Swift app. Communication between the Angular UI and native Swift code is done using WKScriptMessageHandler.
The app mostly works without issues, but in rare edge cases, we’re seeing crashes on the main thread, and the crash is reported in Firebase Crashlytics. The root cause appears related to CFRelease and WKScriptMessageHandler.
Here’s the relevant crash stack:
Crashed: com.apple.main-thread
0 CoreFoundation 0xbfac CFRelease + 44
1 CoreFoundation 0xa734 __CFURLDeallocate + 128
2 CoreFoundation 0x730c _CFRelease + 292
3 libobjc.A.dylib 0x4e28 AutoreleasePoolPage::releaseUntil(objc_object**) + 204
4 libobjc.A.dylib 0x4cbc objc_autoreleasePoolPop + 260
5 WebKit 0x99f194 WebKit::WebUserContentControllerProxy::didPostMessage(WTF::ObjectIdentifierGeneric<WebKit::WebPageProxyIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>, WebKit::FrameInfoData&&, WTF::ObjectIdentifierGeneric<WebKit::ScriptMessageHandlerIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>, std::__1::span<unsigned char const, 18446744073709551615ul>, WTF::CompletionHandler<void (std::__1::span<unsigned char const, 18446744073709551615ul>, WTF::String const&)>&&) + 680
6 WebKit 0x1b358 WebKit::WebUserContentControllerProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 392
7 WebKit 0xe86b0 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 272
8 WebKit 0x23c0c WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 44
9 WebKit 0xe3f054 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) + 252
10 WebKit 0x332d4 IPC::Connection::dispatchIncomingMessages() + 744
11 JavaScriptCore 0x58a7c WTF::RunLoop::performWork() + 204
12 JavaScriptCore 0x599a4 WTF::RunLoop::performWork(void*) + 36
13 CoreFoundation 0x56328 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
14 CoreFoundation 0x562bc __CFRunLoopDoSource0 + 176
15 CoreFoundation 0x53dc0 __CFRunLoopDoSources0 + 244
16 CoreFoundation 0x52fbc __CFRunLoopRun + 840
17 CoreFoundation 0x52830 CFRunLoopRunSpecific + 588
18 GraphicsServices 0x11c4 GSEventRunModal + 164
19 UIKitCore 0x3d2eb0 -[UIApplication _run] + 816
20 UIKitCore 0x4815b4 UIApplicationMain + 340
21 APP1 0xa2f80 main + 21 (AppDelegate.swift:21)
22 ??? 0x1c234eec8 (シンボルが不足しています)
Steps:
WebView: WKWebView
Message passing: WKScriptMessageHandler → passing data from Angular → Swift
WKWebView is long-lived and reused
Native is using WKUserContentController.add(_:name:) to register handlers
Crashes are intermittent (hard to reproduce), but often follow:
Screen sleep/wake
Push notification open
Angular calling native immediately after resume
Questions:
Has anyone seen this specific crash pattern involving CFRelease and WKScriptMessageHandler?
Are there known WebKit or CoreFoundation bugs related to WKScriptMessageHandler and retained URLs or message content?
Thank you for your help!
Our app connects to the headend to get a IDP login URL for each connection session, for example: “https://myvpn.ocwa.com/+CSCOE+/saml/sp/login?ctx=3627097090&acsamlcap=v2” and then open embedded webview to load the page. (Note: the value of ctx is session token which changes every time). Quite often the webview shows blank white screen. After user cancel the connection and re-connect, the 2nd time webview loads the content successfully.
The working case logs shows:
didReceiveAuthenticationChallenge is called
decidePolicyForNavigationAction is called twice
didReceiveAuthenticationChallenge is called
decidePolicyForNavigationResponse is called
didReceiveAuthenticationChallenge is called
But the failure case shows:
Filed to terminate process: Error Domain=com.apple.extensionKit.errorDomain Code=18 "(null)" UserInfo={NSUnderlyingError=0x11461c240 {Error Domain=RBSRequestErrorDomain Code=3 "No such process found" UserInfo={NSLocalizedFailureReason=No such process found}}}
didReceiveAuthenticationChallenge is called
decidePolicyForNavigationAction is called
decidePolicyForNavigationResponse is called
If we stop calling evaluateJavaScript code to get userAgent, the blank page happens less frequently. Below is the code we put in makeUIView():
func makeUIView(context: Context) -> WKWebView
{
if let url = URL(string: self.myUrl)
{
let request = URLRequest(url: url)
webview.evaluateJavaScript("navigator.userAgent")
{
result, error in
if let error = error
{
NSLog("evaluateJavaScript Error: \(error)")
}
else
{
let agent = result as! String + " " + self.myUserAgent
webview.customUserAgent = agent
webview.load(request)
}
}
}
return self.webview
}
Found some posts saying call evaluateJavaScript only after WKWebView has finished loading its content. However, it will block us to send the userAgent info via HTTP request. And I don’t think it is the root cause since the problem still occurs with less frequency.
There is no problem to load same web page on Windows desktop and Android devices. The problem only occurs on iOS and macOS which both use WKWebview APIs.
Is there a bug in WKWebview?
Thanks,
Ying