Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.

All subtopics
Posts under Safari & Web topic

Post

Replies

Boosts

Views

Activity

Getting a crash in Webkit on iOS 18. Any solutions for this?
Here are the crash logs from Firebase Crashlytics Crashed: com.apple.IPC.ReceiveQueue 0 libsystem_platform.dylib 0x70c8 _os_unfair_lock_recursive_abort + 36 1 libsystem_platform.dylib 0x42d8 _os_unfair_lock_lock_slow + 308 2 WebKit 0xe2a5f0 <redacted> + 44 3 WebKit 0xe2a264 <redacted> + 320 4 WebKit 0xe29b24 <redacted> + 304 5 WebKit 0x1d8fc <redacted> + 740 6 libdispatch.dylib 0x40d0 _dispatch_client_callout + 20 7 libdispatch.dylib 0x7580 _dispatch_continuation_pop + 596 8 libdispatch.dylib 0x1b53c _dispatch_source_latch_and_call + 420 9 libdispatch.dylib 0x1a104 _dispatch_source_invoke + 836 10 libdispatch.dylib 0xb560 _dispatch_lane_serial_drain + 368 11 libdispatch.dylib 0xc1e0 _dispatch_lane_invoke + 380 12 libdispatch.dylib 0x17258 _dispatch_root_queue_drain_deferred_wlh + 288 13 libdispatch.dylib 0x16aa4 _dispatch_workloop_worker_thread + 540 14 libsystem_pthread.dylib 0x4c7c _pthread_wqthread + 288 15 libsystem_pthread.dylib 0x1488 start_wqthread + 8
Topic: Safari & Web SubTopic: General Tags:
5
6
1k
Sep ’24
"CALayer position contains NaN" Crash in WKWebView on iOS 26 Beta
I’m experiencing a crash in WKWebView on iOS 26 Developer Beta 5 and Beta 6 with the following exception: CALayer position contains NaN: [nan 65] The crash occurs when the following CSS properties are applied to content displayed in WKWebView: -webkit-user-select: none; -webkit-touch-callout: none; This issue happens consistently whenever these styles are set, leading to the crash inside WKWebView. Is this a known bug in the current iOS 26 betas, or is there a recommended workaround?
4
6
410
Aug ’25
Safari 18: fetch() in safari extension does not include credentials
It seems Safari 18's fetch() does not include credentials even credentials: include and safari extension has host_permissions for that domain. Is there anyone has this problem? I try to request in popup.js like this: const response = await fetch( url, { method: 'GET', mode: 'cors', credentials: 'include', referrerPolicy: 'no-referrer', } ); and it does not include the cookie from host_permissions. Those code worked in Safari 17 (macOS Sonoma).
6
6
1.5k
Sep ’24
macOS 15.1 WKWebView not allowing user to contract a text selection
We have an iOS app (which runs on macOS via "Designed for iPad") which renders web content on WKWebView. Our users can select text (standard OS way of click & drag cursor across text) and then perform actions on those discrete pieces of text. On macOS 15.1, our users can only expand a text selection, they cannot contract the text selection by dragging the cursor to the left. This reduces the usability of our app on macOS 15.1. This is not an issue on macOS 14. Environment: MacBook Pro (2021 16” M1 Max), macOS 15.1 Submitted Feedback FB15726254.
1
6
498
Jan ’25
iOS 26 Safari will not render position: fixed content below the browser controls
Bug Report: Safari refuses to render content that is position: fixed or position: sticky if it goes below the iOS 26 navigation controls at the bottom of the browser. Since the controls are transparent and floating, this is a problem as fixed content is effectively unable to reach the bottom of the page. Attempting to move it below 100vh causes it to be cut off rather than rendering behind the navigation elements. Here is some code reproducing the issue: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> html, body { margin: 0; padding: 0; background-color: #363636; } #just-a-bird { position: fixed; bottom: -100px; width: 300px; height: auto; background: red; } </style> </head> <body> <img id="just-a-bird" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Cattle_tyrant_%28Machetornis_rixosa%29_on_Capybara.jpg/640px-Cattle_tyrant_%28Machetornis_rixosa%29_on_Capybara.jpg"> </body> </html>
2
6
392
4d
WKWebView adding cookie does not work with iOS 18 beta
If you create a cookie and add to the WKWebViewConfiguration the completionHandler returns 'Cookies synced' suggesting cookie was added with success. However, upon inspection of app in Safari the cookie is not there. This is broken in iOS 18 beta and works in previous versions without issue. Did Apple change the WKWebView API and break this feature? code snippet: NSDictionary* settings = self.commandDelegate.settings; WKWebViewConfiguration* configuration = [self createConfigurationFromSettings:settings]; configuration.userContentController = userContentController; NSMutableDictionary *cookieProperties = [NSMutableDictionary dictionary]; [cookieProperties setObject:@"foo" forKey:NSHTTPCookieName]; [cookieProperties setObject:@"bar" forKey:NSHTTPCookieValue]; [cookieProperties setObject:@"mydomain.com" forKey:NSHTTPCookieDomain]; [cookieProperties setObject:@"mydomain.com" forKey:NSHTTPCookieOriginURL]; [cookieProperties setObject:@"/" forKey:NSHTTPCookiePath]; NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:cookieProperties]; [configuration.websiteDataStore.httpCookieStore setCookie:cookie completionHandler:^{NSLog(@"Cookies synced");}]; WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:self.engineWebView.frame configuration:configuration];
8
5
3.7k
Oct ’24
iOS 26 BETA 4 Safari Web Extension disappearing right after install, "extension" is no longer available.
our company created a web safari extension. before iOS 26 (beta) release we would archive our extension and install to our devices no problem. since iOS 26 (beta) (we also tried in beta 4 23A5297m) the extension would archive perfectly but when installing the extension would just not run. its found in settings under safari extension, but when enabled the extension and open safari it will show error message "Ext" is no longer available. to rule out all code issues, we built a new project from scratch with a new bundle id, tried to archive with no problem, but when installed in an iphone 16 with iOS 26 BETA (23A5297m) same error ocurs it installs but when opening safari it will give an error message saying extension is no longer available. attached in the google drive link is a zip file of the new project, a zip file with a succesfull build of the ipa file with enterprise distribute, a video of the entire proccess and the error that the iphone gives. also attached a log file from the iphone that includes the install and the crash of the app. within the logs there is a log saying Error occurred during transaction: The provided identifier "dev.sacal.ext" is invalid. before ios 26 the exact steps worked perfectly. https://drive.google.com/file/d/1PYDOv8IRvRY_ouqiOc0sJdcfh0CHbL72/view?usp=sharing
7
2
806
2d
iOS26 wkWebview Crash Application threw exception CALayerInvalidGeometry: CALayer position contains NaN:
version:26.0-23A5308g Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 103.667]. Layer: <CALayer:0x15793f720; position = CGPoint (0 0); bounds = CGRect (0 0; 0 48); delegate = <_UIEditMenuListView: 0x10f962f80; frame = (nan 0; 0 48); anchorPoint = (inf, 0); alpha = 0; layer = <CALayer: 0x15793f720>>; sublayers = (<CALayer: 0x155964e70>, <CALayer: 0x15793eaf0>); opaque = YES; allowsGroupOpacity = YES; anchorPoint = CGPoint (inf 0); opacity = 0>'
Topic: Safari & Web SubTopic: General
1
5
288
Aug ’25
RTCPeerConnection is undefined on page loaded in Mac WKwebview
Hello I have a webrtc-based web app that is loaded inside a WKWebView. The web app gets loaded just fine in our iOS App running WKWebView on an iPad with iOS 15.1. We are using the exact same app, built for Mac Catalyst. However, on the Mac version, the web app gets loaded but the RTCPeerConnection object is undefined.. Meaning that our web app assumes that WebRTC is not available in that browser. Isn't the native app supposed to work the exact same on iOS and MacOS? Is the Mac version of WKWebView more limited than its iOS counterpart ? Is there any resource that states exactly what is supported in WKWebview in each platform? Thanks
3
0
2k
Nov ’24
Unable to Override "Link with Highlight" in WKWebView
Hello everyone, I'm working on an app that uses WKWebView. My app uses a custom menu and we disable the default menu by overriding with: WKWebAction.canPerformAction() However, with the new iOS 18.2 release, I am no longer able to override the "Copy Link with Highlight" option that pops up when highlighting a selection as can be seen from the screenshot: Has anyone found a work around/bypass for this? Environment iOS Version: iOS 18.2 Device: iPhone 13 Pro App platform: iOS Xcode version: 16.1 MacOS: 14.5
5
5
1.1k
1d
How to get tab/url's favicon in safari web extension natively?
I'm converting a Chrome Extension to a Safari Web Extension, I found it's not easy to get favicon of current tab/url natively. The tab object in Safari doesn't have favIconUrl. { &#9;"id": 121, &#9;"index": 6, &#9;"active": true, &#9;"width": 1324, &#9;"audible": false, &#9;"url": "https://github.com/", &#9;"mutedInfo": { &#9;&#9;"muted": false &#9;}, &#9;"windowId": 2, &#9;"title": "GitHub", &#9;"incognito": false, &#9;"pinned": false, &#9;"height": 935, &#9;"highlighted": true, &#9;"status": "complete" } &#9;&#9; 2. I didn't find Safari has similar thing like chrome://favicon 3. I found Safari's favicon caches in ~/Library/Safari/Favicon Cache/favicons but have no idea how to use them in Safari Web Extension.
2
0
1.4k
Mar ’25
iOS26 wkWebview Crash CALayer position contains NaN
On my native app, will open a wkWebview to display some content. And it will crash on iOS26: *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 103.667]. Layer: <CALayer:0x14c2457d0; position = CGPoint (0 0); bounds = CGRect (0 0; 0 48); delegate = <_UIEditMenuListView: 0x14c273980; frame = (nan 0; 0 48); anchorPoint = (inf, 0); alpha = 0; layer = <CALayer: 0x14c2457d0>>; sublayers = (<CALayer: 0x1306320a0>, <CALayer: 0x14c245a70>); opaque = YES; allowsGroupOpacity = YES; anchorPoint = CGPoint (inf 0); opacity = 0>'
Topic: Safari & Web SubTopic: General Tags:
3
5
350
Aug ’25
invalid_client : Apple sign in web
I am trying to setup web sign in with apple, I have an active apple subscription and have set up all necessary things. I made a service id in apple Identifiers, connected to existing primary id (also has apple sign in enabled). I have my domain set up also correctly but still I cant generate the code due to invalid client. What do I need to do? I have also tried recreating the service ids multiple times with no luck. my init is AppleID.auth.init({ clientId : '[CLIENT_ID]',//used the service id one not app id redirectURI : '[REDIRECT_URI]', usePopup : true }); link to generate codes now is: https://appleid.apple.com/auth/authorize?client_id=com.crmtournest.sigin&redirect_uri=https%3A%2F%2Fwww.tournestcrm.com%2Fauth%2Fcallback&response_type=code%20id_token&state=saciy7rn1km&scope=name%20email&response_mode=web_message&frame_id=03487c22-abb4-48cd-8613-d6bf5836e9eb&m=11&v=1.5.5 Also tried: https://appleid.apple.com/auth/authorize?client_id=com.crmtournest.sigin&redirect_uri=https%3A%2F%2Fwww.tournestcrm.com%2Fauth%2Fcallback&response_type=code%20id_token (not working) I get invalid_client setup on apple below:
4
4
110
Jun ’25
iOS 18 Massive Mobile Safari Extensions bug: declarativeNetRequest is extremely slow at applying rulesets and dynamic rules in iOS 18 compared to iOS 17
In Safari Web Extensions on iOS 18, declarativeNetRequest Rulesets and Dynamic Rules take over twice as long to apply -- which causes rulesets to often fail to apply before sites load. In a boilerplate Xcode project you can note the time difference toggling the OISD (https://oisd.nl) ruleset on iOS 17 and iOS 18 simulators. Additionally, if you force quit Safari and reopen to a site with ads blocked by OISD list (e.g. espn.com) the content will be blocked in that initial state on iOS 17, but not in iOS 18 due to the latency. Based on the boilerplate extension, this bug is impacting all Mobile Safari Extensions using declarativeNetRequest Rulesets and Dynamic Rules. We know several other extension developers dealing with this issue. Our team wrote detailed reproduction steps in our Feedback Assistant ticket: https://feedbackassistant.apple.com/feedback/15196130 but have received no responses. I would attach a screen recording here but it won't allow me.
1
4
797
Oct ’24
TTS voices missing from web speech API in Safari since iOS 18
Web-apps which call speechSynthesis.getVoices() used to get a couple of good quality TTS voices which are still available in the iOS 18 simulator: com.apple.voice.compact.es-ES.Monica and com.apple.voice.compact.es-MX.Paulina Unfortunately on a real iPhone running iOS 18, these voices are not available, which is a regression since iOS 17 had them. The only Spanish voices start with the prefix com.apple.eloquence.es and are of worse quality.
Topic: Safari & Web SubTopic: General
1
4
531
Sep ’24
WKWebView crash on iOS 26 Beta with -webkit-user-select: none
On iOS 26 Beta, WKWebView consistently crashes when interacting with pages that use -webkit-user-select: none. This issue does not reproduce in Safari, but only when the same content is loaded inside a WKWebView. Steps to Reproduce: Install iOS 26 Beta. Open a WKWebView that loads a webpage with the following style applied globally: -webkit-user-select: none; Perform the following gesture sequence inside the WKWebView: Double tap anywhere in the web content. On the second tap, keep your finger pressed (do not lift). While still holding the second tap, drag your finger across the screen (pan). This sequence reliably produces the crash. Expected Result: No crash. The gesture should either be ignored or handled gracefully. Actual Result: The app crashes 100% of the time with the following exception: #0 0x000000013f1a0874 in __pthread_kill () #1 0x00000001357522ec in pthread_kill () #2 0x00000001801ad950 in abort () #3 0x00000001802fa26c in __abort_message () #4 0x00000001802ea1a4 in demangling_terminate_handler () #5 0x0000000180077218 in _objc_terminate () #6 0x00000001802f9758 in std::__terminate () #7 0x00000001802fc7c0 in __cxxabiv1::failed_throw () #8 0x00000001802fc7a0 in __cxa_throw () #9 0x000000018009c1bc in objc_exception_throw () #10 0x00000001804f38f8 in +[NSException raise:format:] () #11 0x000000018c5fb570 in -[CALayer setPosition:] () #12 0x0000000185d02414 in -[UIView _backing_setPosition:] () #13 0x00000001867ec978 in -[UIView setCenter:] () #14 0x0000000186666468 in -[_UIEditMenuContentPresentation _displayPreparedMenu:titleView:reason:didDismissMenu:configuration:] () #15 0x0000000186666088 in __54-[_UIEditMenuContentPresentation _displayMenu:reason:]_block_invoke () #16 0x00000001867b3ed4 in -[UIEditMenuInteraction _editMenuPresentation:preparedMenuForDisplay:completion:] () #17 0x0000000186665fb0 in -[_UIEditMenuContentPresentation _displayMenu:reason:] () #18 0x0000000186665de4 in -[_UIEditMenuContentPresentation displayMenu:configuration:] () #19 0x00000001867b3260 in __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke () #20 0x00000001867b4c98 in __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke () #21 0x000000018653ff80 in __109-[UITextContextMenuInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke () #22 0x0000000186540448 in __107-[UITextContextMenuInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:]_block_invoke () #23 0x000000018dba84f8 in ***::Detail::CallableWrapper<***::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebPage::RequestDocumentEditingContext, ***::CompletionHandler<void (WebKit::DocumentEditingContext&&)>>(***::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&, ***::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*), void, IPC::Connection*, IPC::Decoder*>::call () #24 0x000000018dca14cc in ***::Detail::CallableWrapper<WebKit::AuxiliaryProcessProxy::sendMessage(***::UniqueRef<IPC::Encoder>&&, ***::OptionSet<IPC::SendOption>, std::__1::optional<IPC::ConnectionAsyncReplyHandler>, WebKit::AuxiliaryProcessProxy::ShouldStartProcessThrottlerActivity)::$_1, void, IPC::Connection*, IPC::Decoder*>::call () #25 0x000000018e2d5c54 in IPC::Connection::dispatchMessage () #26 0x000000018e2d6118 in IPC::Connection::dispatchIncomingMessages () #27 0x00000001997f9c58 in ***::RunLoop::performWork () #28 0x00000001997fa930 in ***::RunLoop::performWork () #29 0x000000018044d4dc in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ () #30 0x000000018044d424 in __CFRunLoopDoSource0 () #31 0x000000018044cc0c in __CFRunLoopDoSources0 () #32 0x000000018044bd84 in __CFRunLoopRun () #33 0x0000000180446e24 in _CFRunLoopRunSpecificWithOptions () #34 0x00000001924c19bc in GSEventRunModal () #35 0x00000001862217a8 in -[UIApplication _run] () #36 0x00000001862259d0 in UIApplicationMain () Same issues below. https://developer.apple.com/forums/thread/796799 https://developer.apple.com/forums/thread/796501 https://developer.apple.com/forums/thread/796874 https://developer.apple.com/forums/thread/796686
3
4
1k
Aug ’25
Support request regarding missing params in Redirect URL and inconsistent Universal Link behavior on iOS 18.4
(1) Context: Our project has a login feature via WEBVIEW (using SFSafariViewController) and integrates PassKey on the Web side. The app listens for a successful login by capturing the redirect URL via the delegate of SFSafariViewController. (2) Issue: On iOS &lt; 18.4: The redirect URL is captured with full parameters returned. https://xyz.com/home?session_state=...&amp;code=... On iOS ≥ 18.4: The redirect URL is captured successfully but missing parameters. https://xyz.com/home We currently suspect that the issue originates from the SFSafariViewController framework after the release of iOS 18.4. Has anyone experienced a similar issue? We would also appreciate support from the Apple team.
8
4
381
Jul ’25
WKWebView: Failed to acquire RBS assertion 'WebKit Media Playback'
Hi there! I'm new to App Development and I'm running into the following error when playing audio on a website loaded through a WKWebView: 0x112000cc0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=70.197, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)} Looking through this forum, it seems more people have this issue, yet no one has found a solution (or posted it...). The solutions that I did find (Background Modes capability, webView.configuration.allowsInlineMediaPlayback = true), did nothing. To make sure the issue had nothing to do with my own code, I created an empty project to reproduce the issue. I'm not sure on the best way to share it, but it's a small file (forgive me, I have no clue what it does, actually chatGPT made it for me. My real application is a WebApp wrapped with Capacitor, so it handles all the Swift stuff) import SwiftUI import WebKit struct WebView: UIViewRepresentable { let urlString: String func makeUIView(context: Context) -> WKWebView { let webView = WKWebView() webView.configuration.allowsInlineMediaPlayback = true webView.configuration.allowsAirPlayForMediaPlayback = true webView.navigationDelegate = context.coordinator return webView } func updateUIView(_ uiView: WKWebView, context: Context) { if let url = URL(string: urlString) { let request = URLRequest(url: url) uiView.load(request) } } func makeCoordinator() -> Coordinator { Coordinator(self) } class Coordinator: NSObject, WKNavigationDelegate { var parent: WebView init(_ parent: WebView) { self.parent = parent } func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) { print("Web page loading failed: \(error.localizedDescription)") } } } struct WebViewDemo: View { var body: some View { NavigationView { WebView(urlString: "https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all") .navigationBarTitle("Web View") } } } struct WebView_Previews: PreviewProvider { static var previews: some View { WebViewDemo() } } Nothing special, right? When I build the app and navigate to a website that has an tag (https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all). I still see the error when I play the audio. It plays nonetheless, but the error is there. I'm not at all interested in actually playing audio in the background/when the app is closed/suspended. I just want the error to go away! I've tried different iOS versions (14,15,16,17), but the problem persists. Anyone know what's happening?
7
4
7.5k
Aug ’25