TLDR: I’m searching for a possibility to allow the usage of passkeys and hardware keys for any website in a wkwebview
INFO: The browser is macOS ONLY
Hi, I couldn’t really find documentation or forums posts on how to implement Webauthn for signin or hardware security keys for a second factor. Or rather where those events are triggered to be handled. In Safari you have that popover, that lets you either authenticate through Passwords or with a security key.
When I visit webauthn.io for testing and click either register or authenticate I get
Told not to present authorization sheet: Error Domain=com.apple.AuthenticationServicesCore.AuthorizationError Code=1 "(null)"
ASAuthorizationController credential request failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "(null)"
If I add
func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @MainActor (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
and
func webView(_ webView: WKWebView, authenticationChallenge challenge: URLAuthenticationChallenge, shouldAllowDeprecatedTLS decisionHandler: @escaping @MainActor (Bool) -> Void)
it doesn’t seem to change anything.
I found something about the ASWebAuthenticationSessionWebBrowserSupported entitlement, but by my understanding this is used so a browser can get opened upon some other app calling a ASWebAuthenticationSession.
Has anyone some guidance for me? I feel like webauthn and yubikey support are important security measures for our users.
https://codeberg.org/miakoring/Amethyst/src/branch/main/Amethyst/Shared/ViewComponents/WebKit/WebViewModel.swift
is the code for my webviewmodel.
Delegates are in the Delecate folder https://codeberg.org/miakoring/Amethyst/src/branch/main/Amethyst/Shared/ViewComponents/WebKit
WebKit
RSS for tagDisplay web content in windows and implement browser features using WebKit.
Posts under WebKit tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi all,
Chrome has it already - animation-timeline aka scroll-animations.
I can nowhere find any informations on what's the status in Safari/Webkit.
Seems like they do not have it on the agenda at all?
Does anyone know anything - I wanted to push a feature request for that - but also seem there is no feature request list anymore for webkit.
See: https://www.w3.org/TR/scroll-animations/
Cheers and kind regards!
How can i add Authorization header to a wkwebview. I checked https://developer.apple.com/documentation/foundation/nsurlrequest#1776617 which says Authorization header is a reserved http header and shouldn’t be set. I want to set it when requesting a url to the server which will be used for verification. How can i do that?
Hi,
We have a native application with a webview part.
When we open the app, we load webview resources in a false foreground. The webview communicates with the native part to query local variables, among other things. We have noticed that for the past few weeks, when the biometric component is presented to enter the fingerprint or faceId, while the component is displayed, the webview does not respond.
We do not see the calls made by the webview, nor can we respond to them. Even if you open the Safari debugger, the webview does not respond UNTIL you close the biometric component in the native part.
This has created a big problem in our app, and we wanted to know if it is an issue you had on your radar.
Thank you very much.
Dear Apple Developer Experts,
We're experiencing an intermittent issue with WKWebView in our macOS application where local HTML file access is occasionally denied by the sandbox, despite proper implementation and permissions. We seek your guidance in understanding and resolving this issue.
Issue Description:
The WKWebView occasionally fails to load local HTML files stored in the app's Contents/Resources directory
Error occurs in WebKit Networking Process with sandbox denial
Issue is intermittent and can be resolved by app restart or WebKit Networking Process restart
Affects all local HTML files in the same directory once the issue occurs
Technical Details:
Error from Kernel Log:
2025-02-07 14:57:17.179821 +0800 kernel Sandbox: com.apple.WebKit.Networking(58661) deny(1) file-read-data /Applications/DingTalk.app/Contents/Resources/webcontent/contact-2024.html
WKWebView Delegate Error (captured in WKNavigationDelegate method):
(void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
Error Details:
Domain: NSPOSIXErrorDomain
Code: 1
Description: "Operation not permitted"
UserInfo: {
networkTaskMetricsPrivacyStance: Unknown,
_NSURLErrorFailingURLSessionTaskErrorKey: LocalDataTask <3694CA1E-481B-4E06-975D-E3A56AD56C0F>.<1>,
_kCFStreamErrorDomainKey: 1,
_kCFStreamErrorCodeKey: 1
}
Key Observations:
Error is captured in WKNavigationDelegate's didFailProvisionalNavigation method
The issue affects all local HTML files in the same directory once it occurs
Temporary workarounds we've discovered:
Restarting the application completely resolves the issue
Without restarting the application, terminating the "WebKit Networking Process" via Activity Monitor causes the process to automatically restart, and this resolves the issue and load works again
Additional Information:
We've collected complete system diagnostics (system_logs.logarchive) at the time of failure
The issue appears similar to discussions in Apple Developer Forums (https://developer.apple.com/forums/thread/110072), though we're uncertain if it's the same root cause
We've prepared a minimal demo project demonstrating:
Our release version app can be downloaded from: https://dtapp-pub.dingtalk.com/dingtalk-desktop/mac_dmg/Release/M1-Beta/DingTalk_v7.6.45_43521682_universal.dmg?spm=0.0.0.0.UuwovG&file=DingTalk_v7.6.45_43521682_universal.dmg for examining our app's codesign, sandbox, and entitlements configurations if needed
Important Investigation Finding:
We attempted to simulate the issue by using chmod 000 /path/to/test.html, but this produces a different error:
CopyError Domain=NSURLErrorDomain
Code=-1102
Description="You do not have permission to access the requested resource."
UserInfo={
NSLocalizedDescription=You do not have permission to access the requested resource.,
NSErrorFailingURLStringKey=file:///Users/sunus/Library/Developer/Xcode/DerivedData/WKWebViewLocalDemo-eumardnlfbmwgnhkaadglsrrhzhs/Build/Products/Debug/WKWebViewLocalDemo.app/Contents/Resources/test.html,
NSUnderlyingError=0x600003aedc50 {Error Domain=kCFErrorDomainCFNetwork Code=-1102 "(null)"}
}
This error is distinctly different from our original issue's "Operation not permitted" error, suggesting that the sandbox denial we're experiencing is not a simple file permission issue.
Questions:
Is this a known issue with the WebKit sandbox in recent macOS versions?
Are there recommended best practices or workarounds to prevent this sandbox denial?
Could this be related to the WebKit Networking Process's sandbox configuration?
Are there additional diagnostics or logs we should collect to help investigate this issue?
We appreciate your assistance in investigating this issue. Please let us know if you need any additional information or clarification.
STEPS TO REPRODUCE
Open App
Then loads the local file in /WKWebViewLocalDemo.app/Contents/Resources/test.html
PS, We also submit a DTS & Feedback
DTS:Case-ID: 11876957
Feedback-ID: FB16493282
sysdiagnose is in the Feedback-ID: FB16493282 is uploaded
Hello everyone,
In my application, i have implemented authentication using ASWebauthenticationSession. However, when redirecting the user to a WKWebView, no cookies are shared, causing the session to be lost and requiring the user to log in again.
Is there a way to share cookies between the two? If not, what would be the best approach to set up authentication that ensures SSO when switching to a WebView ?
Thank you very much for your help !
We have an app store app that hosts an internal webserver we use as a proxy and it works for a period until iOS 18.3.x decides our cert is no longer valid at which point our customer have reinstall the app. This has only become a problem on iOS18.3. We publish the self-signed with out app, and it is valid and accepted until it's not. We know the cert is valid and our implementation of the local proxy has not changed. If we install a cert on the device and trust it, then the app will start behaving normally again without reinstall. We have replicated this locally and the error we are seeing is:
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _WKRecoveryAttempterErrorKey=<WKReloadFrameErrorRecoveryAttempter: 0x301111e40>, networkTaskDescription=LocalDataTask <541390E2-65FA-47AB-80B1-10209D6C761A>.<3>, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
"<cert(0x108e3b700) s: 127.0.0.1 i: 127.0.0.1>",
"<cert(0x108e3b980) s: 127.0.0.1 i: 127.0.0.1>"
), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://localhost:8082/Blablal/?device=ios&sftouch=1&pgport=8081&secure=1, NSErrorFailingURLStringKey=https://localhost:8082/blahblah/?device=ios&sftouch=1&pgport=8081&secure=1, NSUnderlyingError=0x301e1d680 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802}}, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <541390E2-65FA-47AB-80B1-10209D6C761A>.<3>"
), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <541390E2-65FA-47AB-80B1-10209D6C761A>.<3>, networkTaskMetricsPrivacyStance=NotEligible, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x302670a50>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}
We are using WebKit in our app and recently started noticing a crash occurring on iOS 17 and earlier versions. The crash log shows the following error:
Thread 0 Crashed:
0 WebKit 0x00000001a38593cc WebKit::WebPageProxy::updateActivityState(WTF::OptionSet<WebCore::ActivityState>) + 220 (WebPageProxy.cpp:2544)
1 WebKit 0x00000001a39cb1e0 WebKit::WebPageProxy::dispatchActivityStateChange() + 132 (WebPageProxy.cpp:2653)
2 WebKit 0x00000001a3f541f8 WTF::Detail::CallableWrapper<WebKit::WebPageProxy::scheduleActivityStateUpdate()::$_5::operator()() const::'lambda'(), void>::call() + 52 (Function.h:53)
3 JavaScriptCore 0x00000001a48317ec void WTF::dispatchWorkItem<WTF::(anonymous namespace)::DispatchWorkItem>(void*) + 60 (WorkQueueCocoa.cpp:48)
4 libdispatch.dylib 0x00000001964f5dd4 _dispatch_client_callout + 20 (object.m:576)
5 libdispatch.dylib 0x00000001965045a4 _dispatch_main_queue_drain + 988 (queue.c:7898)
6 libdispatch.dylib 0x00000001965041b8 _dispatch_main_queue_callback_4CF + 44 (queue.c:8058)
7 CoreFoundation 0x000000018e623710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
8 CoreFoundation 0x000000018e620914 __CFRunLoopRun + 1996 (CFRunLoop.c:3149)
9 CoreFoundation 0x000000018e61fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
10 GraphicsServices 0x00000001d34d01a8 GSEventRunModal + 164 (GSEvent.c:2196)
11 UIKitCore 0x0000000190c5890c -[UIApplication _run] + 888 (UIApplication.m:3713)
12 UIKitCore 0x0000000190d0c9d0 UIApplicationMain + 340 (UIApplication.m:5303)
After investigating, we found that this crash was addressed in this https://github.com/WebKit/WebKit/pull/24778 WebKit PR. However, our app is still crashing for users on older iOS versions where this fix is not available.
Is there a known workaround to prevent this crash on affected iOS versions? Any guidance would be greatly appreciated.
After the official release of iOS 18.3, our app has collected numerous identical crash logs. These crashes occurred on different devices, but the common denominator is that they all, and only, happened on iOS 18.3. Based on the stack trace, the crash is happening internally within WebKit. The details are as follows:
Crashed: com.apple.main-thread
0 WebCore 0x721f9c + 28
1 WebCore 0x15b6924 + 11356
2 WebCore 0x15b174c + 1008
3 WebCore 0x1776e4 + 292
4 WebCore 0x17753c WebCore::SerializedScriptValue::deserialize(OpaqueJSContext const*, OpaqueJSValue const**) + 100
5 WebKit 0x530b28 + 92
6 WebKit 0x5a0d2c + 176
7 WebKit 0x9e74b0 + 956
8 WebKit 0xe43d58 + 392
9 WebKit 0x886ac + 272
10 WebKit 0x88940 + 44
11 WebKit 0x87a74 + 252
12 WebKit 0x875ec + 576
13 JavaScriptCore 0x2f8a48 ***::RunLoop::performWork() + 204
14 JavaScriptCore 0x2f895c ***::RunLoop::performWork(void*) + 36
15 CoreFoundation 0x73f4c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
16 CoreFoundation 0x73ee0 __CFRunLoopDoSource0 + 176
17 CoreFoundation 0x76b40 __CFRunLoopDoSources0 + 244
18 CoreFoundation 0x75d3c __CFRunLoopRun + 840
19 CoreFoundation 0xc8284 CFRunLoopRunSpecific + 588
20 GraphicsServices 0x14c0 GSEventRunModal + 164
21 UIKitCore 0x3ee674 -[UIApplication _run] + 816
22 UIKitCore 0x14e88 UIApplicationMain + 340
23 18Birdies 0x1b2d3c main + 14 (main.m:14)
24 ??? 0x1ac161de8 (Missing)
I’m developing an app that has a Fitbit login page embedded in a WKWebView. On the Fitbit login page, there is a Google login button.
When I try to log in to Fitbit via Google, some devices redirect back to the Fitbit login page even after entering the correct Google credentials. However, it works on the second attempt. I tested the same URL in the default browser, and it works fine when the page is loaded in the browser instead of inside the WebView.
I tried the following workarounds but was unable to fix the issue:
1. Enabled JavaScript in WebView.
2. Tried cookie synchronization between WKWebsiteDataStore and HTTPCookieStorage.
While investigating an apparent IOSurface leak in my app, which makes heavy use of WKWebViews, I found that if I simply create an empty web view and start changing page zoom by pinching, I can see the number of IOSurfaces steadily increasing. Programmatically changing the zoom also has this effect. The controller below gets to 3.58GB of persistent IOSurface objects in about 20 seconds. This behavior continues indefinitely. Is this a leak?
I don't think this is just related to zooming, tapping and scrolling also seem to leak IOSurfaces. The problem I was investigating occurs without any of this, just dynamically modifying a web page containing svgs, but I wonder if this is somehow related, as the allocation stack traces are all the same.
I'm running on iOS 18.1.1 on an iPad Pro 12.9in 4th gen.
class LeakTestController: UIViewController {
private(set) var webView: WKWebView!
init() {
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
nil
}
override func viewDidLoad() {
let config = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: config)
view.addSubview(webView)
webView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
view.topAnchor.constraint(equalTo: webView.topAnchor),
view.bottomAnchor.constraint(equalTo: webView.bottomAnchor),
view.leadingAnchor.constraint(equalTo: webView.leadingAnchor),
view.trailingAnchor.constraint(equalTo: webView.trailingAnchor)
])
webView.loadHTMLString("hi", baseURL: nil)
startZooming()
}
func startZooming() {
Task.init {
while true {
try await Task.sleep(nanoseconds: 1000000)
webView.pageZoom = 0.5
try await Task.sleep(nanoseconds: 1000000)
webView.pageZoom = 1
}
}
}
}
The stack trace for the allocations is:
IOSurfaceClientLookupFromMachPort
-[IOSurface initWithMachPort:]
WebCore::IOSurface::createFromSendRight(WTF::MachSendRight const&&)
decltype(auto) std::__1::__variant_detail::__visitation::__base::__dispatcher<1ul>::__dispatch[abi:sn180100]<std::__1::__variant_detail::__visitation::__variant::__value_visitor<WTF::Visitor<WebKit::RemoteLayerBackingStoreProperties::layerContentsBufferFromBackendHandle(std::__1::variant<WebCore::ShareableBitmapHandle, WTF::MachSendRight>&&, WebKit::LayerContentsType)::$_0, WebKit::RemoteLayerBackingStoreProperties::layerContentsBufferFromBackendHandle(std::__1::variant<WebCore::ShareableBitmapHandle, WTF::MachSendRight>&&, WebKit::LayerContentsType)::$_1>>&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, WebCore::ShareableBitmapHandle, WTF::MachSendRight>&>(std::__1::__variant_detail::__visitation::__variant::__value_visitor<WTF::Visitor<WebKit::RemoteLayerBackingStoreProperties::layerContentsBufferFromBackendHandle(std::__1::variant<WebCore::ShareableBitmapHandle, WTF::MachSendRight>&&, WebKit::LayerContentsType)::$_0, WebKit::RemoteLayerBackingStoreProperties::layerContentsBufferFromBackendHandle(std::__1::variant<WebCore::ShareableBitmapHandle, WTF::MachSendRight>&&, WebKit::LayerContentsType)::$_1>>&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, WebCore::ShareableBitmapHandle, WTF::MachSendRight>&)
WebKit::RemoteLayerBackingStoreProperties::layerContentsBufferFromBackendHandle(std::__1::variant<WebCore::ShareableBitmapHandle, WTF::MachSendRight>&&, WebKit::LayerContentsType)
WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer(CALayer*, WebKit::RemoteLayerTreeNode*, WebKit::RemoteLayerTreeHost*, WebKit::LayerProperties const&, WebKit::LayerContentsType)
WebKit::RemoteLayerTreePropertyApplier::applyProperties(WebKit::RemoteLayerTreeNode&, WebKit::RemoteLayerTreeHost*, WebKit::LayerProperties const&, WTF::HashMap<WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PlatformLayerIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>>, std::__1::unique_ptr<WebKit::RemoteLayerTreeNode, std::__1::default_delete<WebKit::RemoteLayerTreeNode>>, WTF::DefaultHash<WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PlatformLayerIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>>>, WTF::HashTraits<WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PlatformLayerIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>>>, WTF::HashTraits<std::__1::unique_ptr<WebKit::RemoteLayerTreeNode, std::__1::default_delete<WebKit::RemoteLayerTreeNode>>>, WTF::HashTableTraits> const&, WebKit::LayerContentsType)
WebKit::RemoteLayerTreeHost::updateLayerTree(IPC::Connection const&, WebKit::RemoteLayerTreeTransaction const&, float)
WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree(IPC::Connection&, WTF::Vector<std::__1::pair<WebKit::RemoteLayerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction>, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WTF::HashMap<WTF::ObjectIdentifierGeneric<WebKit::RemoteImageBufferSetIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>, std::__1::unique_ptr<WebKit::BufferSetBackendHandle, std::__1::default_delete<WebKit::BufferSetBackendHandle>>, WTF::DefaultHash<WTF::ObjectIdentifierGeneric<WebKit::RemoteImageBufferSetIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>>, WTF::HashTraits<WTF::ObjectIdentifierGeneric<WebKit::RemoteImageBufferSetIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits<unsigned long long>, unsigned long long>>, WTF::HashTraits<std::__1::unique_ptr<WebKit::BufferSetBackendHandle, std::__1::default_delete<WebKit::BufferSetBackendHandle>>>, WTF::HashTableTraits>&&)
WebKit::RemoteLayerTreeDrawingAreaProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>)
IPC::Connection::dispatchIncomingMessages()
WTF::RunLoop::performWork()
WTF::RunLoop::performWork(void*)
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
__CFRunLoopDoSource0
__CFRunLoopDoSources0
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
0x192173f40
static UIApplicationDelegate.main()
static AppDelegate.$main()
__debug_main_executable_dylib_entry_point
start
Context: I work on Home Assistant App, a smart home platform which connects locally to their smart home server. The Apps essentially needs the local network permission and every single user gives the permission, but some in macOS 15.3 are reporting that even though the permission is given, the app still reports it is not, and logs also confirm that.
Since there is no way to reset local network permission on macOS I am kind of on a dead end here.
How can the user get out of this situation?
I also read https://developer.apple.com/forums/thread/763753?answerId=824036022&replyId=824036022 and the TN3179 but still no solutions for my case.
I am working on a React Native application where I want to modify the native text selection menu (the menu that appears when you long-press on text). Specifically, I want to add a custom option alongside the default ones like Copy, Look Up, Translate, Search Web, and Share.
Is there a way to modify the native text selection menu inside a WebView on iOS?
How can I add a custom menu option to the default text selection menu while keeping all the default options intact?
After the app is put in background for sometime and the app crashes,
Some cases have the webView involvement before putting the app in to background for quite sometime and pulled into foreground.
Here's the crash log information.
Identifier: com.app.myapp
Version: 2.3.3 (30)
AppStoreTools: 16C5031b
AppVariant: 1:iPhone9,1:15
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.app.myapp [2833]
Date/Time: 2024-12-12 17:30:57.4489 +0100
Launch Time: 2024-12-12 17:04:19.7290 +0100
OS Version: iPhone OS 15.5 (19F77)
Release Type: User
Baseband Version: 9.61.00
Report Version: 104
**Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000018f1358e0
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [82527]
Triggered by Thread: 10
Kernel Triage:
VM - Fault hit memory shortage**
Thread 10 Crashed:
0 WebKit 0x000000018f1358e0 WTFCrashWithInfo(int, char const*, char const*, int) + 20 (Assertions.h:732)
1 WebKit 0x000000018f72e348 WebKit::allDataStores() + 72 (WebsiteDataStore.cpp:100)
2 WebKit 0x000000018f72e278 WebKit::WebsiteDataStore::forEachWebsiteDataStore(WTF::Function<void (WebKit::WebsiteDataStore&)>&&) + 24 (WebsiteDataStore.cpp:107)
3 WebKit 0x000000018f67c440 WebKit::WebProcessPool::updateProcessAssertions() + 52 (WebProcessPool.cpp:1773)
4 WebKit 0x000000018f684508 WebKit::WebProcessProxy::didSetAssertionType(WebKit::ProcessAssertionType) + 880 (Function.h:82)
5 WebKit 0x000000018f5bfdd0 WebKit::ProcessThrottler::setAssertionType(WebKit::ProcessAssertionType) + 712 (ProcessThrottler.cpp:148)
6 WebKit 0x000000018f5bf9b4 WebKit::ProcessThrottler::updateAssertionIfNeeded() + 408 (ProcessThrottler.cpp:176)
7 WebKit 0x000000018f5c42b0 WebKit::ProcessThrottler::Activity<(WebKit::ProcessThrottler::ActivityType)1>::Activity(WebKit::ProcessThrottler&, WTF::ASCIILiteral) + 76 (ProcessThrottler.cpp:58)
8 WebKit 0x000000018f659958 WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld(WebCore::RunJavaScriptParameters&&, std::__1::optional<WTF::ObjectIdentifierWebCore::FrameIdentifierType >, API::ContentWorld&, WTF::Comple... + 240 (ProcessThrottler.h:66)
9 WebKit 0x000000018f3ca7cc -[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:] + 1352 (WKWebView.mm:1151)
10 WebKit 0x000000018f131700 -[WKWebView evaluateJavaScript:completionHandler:] + 120 (WKWebView.mm:896)
11 MyApp 0x00000001044e7e64 cli_signalHandler + 2420
12 MyApp 0x00000001044e4470 getExtraInfoId + 132792
13 MyApp 0x00000001044c2b18 CLI_Reset + 50684
14 MyApp 0x00000001044c2a18 CLI_Reset + 50428
15 MyApp 0x00000001044c1cec CLI_Reset + 47056
16 MyApp 0x00000001044c27e8 CLI_Reset + 49868
17 MyApp 0x00000001044e01f4 getExtraInfoId + 115772
18 MyApp 0x0000000104492498 StringToScreenDensityLevel + 4588
19 libdispatch.dylib 0x0000000180e80094 _dispatch_client_callout + 16 (object.m:560)
20 libdispatch.dylib 0x0000000180e22bb8 _dispatch_continuation_pop$VARIANT$mp + 440 (inline_internal.h:2622)
21 libdispatch.dylib 0x0000000180e348dc _dispatch_source_invoke$VARIANT$mp + 1668 (source.c:596)
22 libdispatch.dylib 0x0000000180e22730 _dispatch_queue_override_invoke + 424 (queue.c:0)
23 libdispatch.dylib 0x0000000180e2fb94 _dispatch_root_queue_drain + 340 (inline_internal.h:0)
24 libdispatch.dylib 0x0000000180e3039c _dispatch_worker_thread2 + 172 (queue.c:6935)
25 libsystem_pthread.dylib 0x00000001dc483dd4 _pthread_wqthread + 224 (pthread.c:2612)
26 libsystem_pthread.dylib 0x00000001dc48393c start_wqthread + 8 (:-1)
Thread 10 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000064 x1: 0x000000018fad60a0 x2: 0x000000018fad6189 x3: 0x0000000000000113
x4: 0x0000000000000030 x5: 0x0000000100000030 x6: 0x0000000000000000 x7: 0x0000000000000001
x8: 0x000000016fd6b000 x9: 0x0000000106dd4580 x10: 0x000000000000002c x11: 0x0000000000020408
x12: 0x0000000000080000 x13: 0x0000000000000000 x14: 0x0000020000011000 x15: 0x0000000100000000
x16: 0x00000001dc48425c x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x000000016fd6a418
x20: 0x0000000282ece080 x21: 0x00000002834ac2a0 x22: 0x00000001f694c000 x23: 0x0000000117004a80
x24: 0x0000000283bb6558 x25: 0x000000011a00a1d8 x26: 0x0000000000000000 x27: 0x0000000000000002
x28: 0x000000016fd6b180 fp: 0x000000016fd6a3d0 lr: 0x000000018f72e348
sp: 0x000000016fd6a3b0 pc: 0x000000018f1358e0 cpsr: 0x60000000
esr: 0xf200c471 (Breakpoint) pointer authentication trap IB
The App has the ability to use WebKit and display web pages and the ability to add phone numbers to CallDirectory at specific timing.
In this App, when the App is launched or when the Add Contact button on the web page is pressed,
CallDirectoryExtention is reloaded from the host app (WebKit-viewController), the phone number is retrieved from the server, and the entry is updated.
I would like to add a process to remove the already added phone number entry when a specific value is retrieved from the application server.
The specific process we wish to implement is as follows.
Step 1: Use URLsession to retrieve values from the application server. (ViewController)
Step 2: If the value is a specific value, call a Function that deletes the CallDirectoryExtention entry. (ViewController)
Step 3: Delete all entries for the registered phone numbers.
However, I am aware that I have to use reloadExtension() to call the CallDirectoryExtention process from ViewController on Step2.
if I do so, CallDirectoryHandler.beginRequest() will be processed, and I am wondering if it is not possible to execute only the Function that deletes the entry.
Is there a way to run only the Function that deletes the CallDirectoryExtention entry from the host app(viewController)?
Hi, we are experiencing a strange issue with our Web App. Our web app runs entirely on the same domain , and we are making several AJAX requests to the same server. The Error occurs only on Iphones, the app works completely fine on androids and computers.
Most of the requests work fine, but suddenly, one specific request always fails with the following error:
XMLHttpRequest cannot load https://demo2.artios.cz/app37g/v105/php/endpoint.php due to access control checks
What we have checked so far:
✅ CORS headers seem correct. Also we operate entirely on the same domain, client and server.
✅ The same request works fine in computer and android devices.
✅ The issue occurs only on iPhone (tested on Chrome and Safari).
✅ Some requests to the same endpoint pass, but suddenly, this specific request always fails.
✅ There is no OPTIONS preflight request logged in the network tab, but we use only simple requests.
✅ We are making a POST request with multipart/form-data.
What is Your advice, or where I can find more info about this error? We do not think the CORS is the problem. We have tried to inspect with WebInspector but with no relevant answers. Thank You very much!
In my content blocker I have a bunch of rules that block some content in Safari, but I want my users to be able to whiltelist a website so the blocker rules don't apply on that site.
I have something like this:
{
"action": {
"type":"css-display-none",
"selector":"a[href*='Bobbins']"
},
"trigger": {
"url-filter":".*"
}
},
{
"trigger": {
"url-filter": ".*",
"if-domain": ["*mydomain.com"]
},
"action": {
"type": "ignore-previous-rules"
}
}
I think that should block any a link where the href includes Bobbins but not if the site is mydomain.com. However, that simply doesn't work. It doesn't matter what I put in the array of domains to whitelist, it just doesn't apply it. In every case, the a link is blocked.
How do you actually whitelist a website in a Safari content blocker?
Prime Objective
I am trying to have a scroll view with a fixed header, a fixed footer, and a WKWebView in between. Using JavaScript, the height of the webView is determined and set to be large enough to hold the entire content.
The Problem
When selecting text on the webView, the view does not scroll when the edges are reached (this works if the webView is shown without being embedded in a Scroll view, or if it is the last element)
What did I try?
I tried reading the scroll view, or adding a gesture recognizer, but all of that does not work because the selection is essentially a system task
Sourcecode
Sourcecode to demonstrate the issue can be found on GitHub
As discussed and acknowledged here, there is a known bug with the FamilyActivityPicker. When a user expands a category that contains enough tokens to exceed the 50mb memory limit, the FamilyActivityPicker crashes.
This happens quite frequently for heavy Safari users. An apple engineer mentioned on this thread that WebDomains shown in the picker are present based on the last 30 days of usage data as surfaced by WebKit.
Is there any way a user can clear these WebDomains? Either programatically through our app or any other process we can guide them to as a workaround while this issue is getting fixed?
Is ServiceWorker supported on WKWebView? As per Mozilla Developer Network(MDN Web) docs[1] its not supported, but our research shows that ServiceWorker becomes available for a domain in WKWebView 1) if the domain is allowlisted in app-bound domains[2] or 2) if app is registered as default browser(this can not be considered for our app as its not a browser).
How to enable ServiceWorker on WKWebView? Is adding domain as app-bound domain the right/only way to enable ServiceWorker on WKWebView? We didn't find any official documentation about this.
Can WebView get ServiceWorker support by default without enabling app bound domains since that is not an option for our app? Our app needs to support more than 10 domains. Powerful APIs such as JavaScript injection, cookie manipulation, event handlers are by default available to all domains/WebView instances even if App doesn't enable app-bound domains. Is it possible to do same for ServiceWorker?
If ServiceWorker can not be supported by default then can Apple provide a feature by which ServiceWorker will be enabled in App for all the domains?
Apple enforces maximum of 10 app-bound domains. Is it possible to remove this limit and provide a way to dynamically add to this list at the time of a request?
[1] https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker#browser_compatibility
[2] https://webkit.org/blog/10882/app-bound-domains/