Display web content in windows and implement browser features using WebKit.

Posts under WebKit tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Iffy runningboard errors using WKWebView in macOS application
I'm migrating a macOS application from the old and deprecated WebView to the new and sparkly WKWebView. It seems to work fine, but four error messages appear in the console (see below) just after the dialog is closed. I searched. It seems this issue can be fixed through the addition of a target entitlement called Background Modes. This particular capability is however not listed by Xcode, so I can't add it. I think this is because we're targeting macOS and not iOS, but I'm not certain. Stuck. Tips and advice appreciated! Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}> 0x2c40246c0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess NearSuspended Assertion' for process with PID=66538, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit} Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}> 0x2c4024720 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=66540, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit} Deployment target is 10.15, Xcode version is 15.3.
0
0
463
Mar ’24
WKWebView fails to open .doc file
I'm currently using a WKWebView to load certain types of documents via loadRequest, but I've recently been running into an issue with .doc files doing this: static NSString *customScheme = @"customscheme"; @interface WordDocWKSchemeHandler : NSObject <WKURLSchemeHandler> @end @implementation WordDocWKSchemeHandler { NSData *_data; NSString *_mimeType; } - (instancetype)initWithData:(NSData*)data mimeType:(NSString*)mimeType{ self = [super init]; if (self) { _data = data; _mimeType = mimeType; } return self; } - (void)webView:(WKWebView *)webView startURLSchemeTask:(id<WKURLSchemeTask>)urlSchemeTask { NSURL *url = urlSchemeTask.request.URL; if (![url.scheme isEqualToString:customScheme]){ return; } NSURLResponse *response = [[NSURLResponse alloc] initWithURL:url MIMEType:_mimeType expectedContentLength:_data.length textEncodingName:@""]; [urlSchemeTask didReceiveResponse:response]; [urlSchemeTask didReceiveData:_data]; [urlSchemeTask didFinish]; } - (void)webView:(WKWebView *)webView stopURLSchemeTask:(id<WKURLSchemeTask>)urlSchemeTask{ //empty } @end - (void)_setupWebViewPropertiesAndConstraints{ _webView.navigationDelegate = self; _webView.hidden = YES; [self.view addConstrainedSubview:_webView]; [self.view addConstraints:[_webView constraintsForFillingSuperview]]; self.container.showsLoadingIndicator = YES; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; WKWebViewConfiguration *docConfig = [WKWebViewConfiguration new]; WordDocWKSchemeHandler *schemeHanlder = [[WordDocWKSchemeHandler alloc] initWithData:_content.data mimeType:_content.contentType]; [docConfig setURLSchemeHandler:schemeHanlder forURLScheme:customScheme]; //Setup webview with custom config handler _webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:docConfig]; [self _setupWebViewPropertiesAndConstraints]; NSURL *customURL = [NSURL URLWithString:[NSString stringWithFormat:@"\%@:/",customScheme]]; [_webView loadRequest:[NSURLRequest requestWithURL:customURL]]; } The mimeType is correctly being resolved to "application/msword" but any time we try to load this the navigation fails: -(void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error { The error message here is OfficeImportErrorDomain Code=912. I've tried this on both a simulator and actual device on iOS 17 and 16 and this always fails. I've also tried turning the data into a base64 string and loading it that way and this also fails. Any advice here would be appreciated. It seems like this used to work at some point but no longer works.
0
0
429
Mar ’24
Crash on [WKWebView initWithFrame: configuration:]
Crash condition: when I update the Xcode version to 15.3 and run the iPhone to load the app on debug mode with the following diagnosing setting: Hardware Model: iPhone 14 pro Role: Foreground Date/Time: 2024-03-08 11:30 -0800 Launch Time: 2024-03-08 11:30 -0800 OS Version: iPhone OS 17.4(21E219) Exception Type: EXC_BREAKPOINT Exception Codes: (code=1, subcode=0x19b1eba48) Exception Note: EXC_BREAKPOINT Triggered by Thread: 1 Thread 1 Queue : com.apple.main-thread (serial) #0 0x000000019b1eba48 in xzm_malloc_zone_free_slow.cold.1 () #1 0x000000019b1e28d0 in xzm_malloc_zone_free_slow () #2 0x00000001a25ef1c8 in pas_try_deallocate_slow_no_cache () #3 0x00000001a10d32f8 in ***::String::String(__CFString const*) () #4 0x00000001a0494ab8 in WebKit::isFullWebBrowserOrRunningTest() () #5 0x00000001a09e1520 in WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration(WebKit::IsPersistent, WebKit::WebsiteDataStoreConfiguration::ShouldInitializePaths) () #6 0x00000001a09d3ae0 in WebKit::WebsiteDataStore::defaultDataStore() () #7 0x00000001a05bc5e8 in +[WKWebsiteDataStore defaultDataStore] () #8 0x00000001a05b6624 in -[WKWebViewConfiguration websiteDataStore] () #9 0x00000001a0576850 in -[WKWebView _initializeWithConfiguration:] () #10 0x00000001a0577e04 in -[WKWebView initWithFrame:configuration:] () #11 0x0000000104cbf724 in -[AAChartView initConfigurationWithFrame:] at /Users/quinn/Documents/objcio/AAChartKit-master/AAChartKitLib/AAChartCreator/AAChartView.m:133 #12 0x0000000104cbf4e8 in -[AAChartView initWithFrame:] at /Users/quinn/Documents/objcio/AAChartKit-master/AAChartKitLib/AAChartCreator/AAChartView.m:115 #13 0x0000000104c133a4 in -[BasicChartVC setupAAChartView] at /Users/quinn/Documents/objcio/AAChartKit-master/AAChartKitDemo/ChartsDemo/BasicChartVC.m:99 #14 0x0000000104c13208 in -[BasicChartVC drawChart] at /Users/quinn/Documents/objcio/AAChartKit-master/AAChartKitDemo/ChartsDemo/BasicChartVC.m:86 #15 0x0000000104c12f9c in -[BasicChartVC viewDidLoad] at /Users/quinn/Documents/objcio/AAChartKit-master/AAChartKitDemo/ChartsDemo/BasicChartVC.m:66 #16 0x000000018d4e530c in -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] () #17 0x000000018d29bfb4 in -[UIViewController loadViewIfRequired] () #18 0x000000018d29a7a8 in -[UIViewController view] () #19 0x000000018d98a384 in -[UINavigationController _startCustomTransition:] () #20 0x000000018d39dca4 in -[UINavigationController _startDeferredTransitionIfNeeded:] () #21 0x000000018d39d3a0 in -[UINavigationController __viewWillLayoutSubviews] () #22 0x000000018d39d304 in -[UILayoutContainerView layoutSubviews] () #23 0x000000018d2b90f8 in -[UIView(CALayerDelegate) layoutSublayersOfLayer:] () #24 0x000000018c6e3e30 in CA::Layer::layout_if_needed(CA::Transaction*) () #25 0x000000018c6e39b4 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) () #26 0x000000018c6e9bb4 in CA::Context::commit_transaction(CA::Transaction*, double, double*) () #27 0x000000018c6e31bc in CA::Transaction::commit() () #28 0x000000018d331280 in _UIApplicationFlushCATransaction () #29 0x000000018d330d78 in _UIUpdateSequenceRun () #30 0x000000018d330468 in schedulerStepScheduledMainSection () #31 0x000000018d330524 in runloopSourceCallback () #32 0x000000018b04162c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ () #33 0x000000018b0408a8 in __CFRunLoopDoSource0 () #34 0x000000018b03f058 in __CFRunLoopDoSources0 () #35 0x000000018b03dd88 in __CFRunLoopRun () #36 0x000000018b03d968 in CFRunLoopRunSpecific () #37 0x00000001cf33b4e0 in GSEventRunModal () #38 0x000000018d4b0edc in -[UIApplication _run] () #39 0x000000018d4b0518 in UIApplicationMain () #40 0x0000000104d42ba8 in main at /Users/quinn/Documents/objcio/AAChartKit-master/AAChartKitDemo/main.m:38 #41 0x00000001ae55ed84 in start ()
6
0
1.5k
May ’24
WKWebView Crash
Xcode 15.3 build with device(iPhone 12 / iOS 17.4) var webView: WKWebView = { let view = WKWebView(frame: .zero, configuration: WKWebViewConfiguration()) return view }() Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1a049fa48) Hello. Also in Firebase too. At first I thought it was a Firebase issue. https://github.com/firebase/firebase-ios-sdk/issues/12485 But there seems to be a problem with iOS 17.4. There is no problem when running the app after disconnecting. Thanks for attention.
0
0
615
Mar ’24
HTMLAudioElement issues in iOS 17.4
We have an angular/ionic based app that has an audio playback feature. It appears that iphone (but not ipad) users who upgrade to iOS 17.4 can no longer play audio in our app. iPad users who upgraded to 17.4 don't have an issue. We use the HTMLAudioElement for audio playback. It appears that in 17.4 it is no longer firing the 'canplay' event that we listening for, for starting our playback. The other data buffering events like 'loadeddata' are also not being delivered. By changing the logic to listen for the 'loadstart' event, audio playback works and then the remaining 'canplaythrough' and 'canplay' are delivered. In other words, I need to start playback before any data buffering status events are delivered, otherwise they never get delivered. I am testing this against an audio delivery server on my same machine and have confirmed that the data is correctly delivered. Is anyone else experiencing a similar issue on iphones in iOS 17.4?
4
1
1.4k
Mar ’24
WKWebView cookies management
Problem statement- WKWebView cookies management. We need to clone the connection used by the WKWebView to the same end point, this connection utilize cookies for routing and missing even one the cookies will end up with a wrong route to be used. It appears that when retrieving the cookies from the WKWebView connection some cookies are missing. From some analysis seems that the missing cookies all have in common a value containing special characters. The question for Apple is if they are going to relax the constraint on cookies value to allow such cookies to be used. Technical Description:- We are using WKWebView. There are some cookies being set during server connection. We are retrieving all cookies using 'getAllCookies' method of WKWebview. Sometime its not giving correct set of cookies in case if there are any special characters in any cookie. For example - Cookie- ss2QKagAdkAV3My1pnKElaFDnQ6lxhgqNbD03IaRbX6WfDz2+P9dT6DdlK8G5WIH3svEATnehZSmWGQ3QFTnew==\n It contains special character "+ = !".
1
0
377
Mar ’24
How to get link preview (LPLinkMetadata) for Twitter post content like iMessage
In iMessage you can link a twitter post and it gets the image (if any), tweet content and title. Yet as a regular dev, I think, that we cannot get the tweet content like iMessage. From this Github issue of Mastodon, I know that in the header there is everything we need, yet in a simple swift code using LPLinkMetadata we cannot get the description. Here is the code below import SwiftUI import LinkPresentation class LinkViewModel : ObservableObject { let metadataProvider = LPMetadataProvider() @Published var metadata: LPLinkMetadata? @Published var image: UIImage? init(link : String) { guard let url = URL(string: link) else { return } metadataProvider.startFetchingMetadata(for: url) { (metadata, error) in guard error == nil else { assertionFailure("Error") return } DispatchQueue.main.async { self.metadata = metadata } guard let imageProvider = metadata?.imageProvider else { return } imageProvider.loadObject(ofClass: UIImage.self) { (image, error) in guard error == nil else { // handle error return } if let image = image as? UIImage { // do something with image DispatchQueue.main.async { self.image = image } } else { print("no image available") } } } } } struct MetadataView : View { @StateObject var vm : LinkViewModel var body: some View { VStack { if let metadata = vm.metadata { Text(metadata.title ?? "no title") Text(metadata.value(forKey: "_summary") as? String ?? "np description" ) } if let uiImage = vm.image { Image(uiImage: uiImage) .resizable() .frame(width: 100, height: 100) } } } } struct ContentView: View { var links = [ "https://www.google.com", "https://www.hotmail.com", "https://twitter.com/t3dotgg/status/1764398959513276630"] let metadataProvider = LPMetadataProvider() var body: some View { List(links, id:\.self) { item in Section{ VStack { Text(item) MetadataView(vm: LinkViewModel(link: item)) } } } } } The twitter link doesn't return any description, I also tried third party OG libraries with the og:title in Swift with no success, yet it works on iMessage. Any tips ? :-)
0
0
370
Mar ’24
WKWebview is not rendering .docx file accurately, docx contains logos in header and watermarks, which are not displayed
Getting the document data from a server using JSON encoded to Base64. WKWebView is not rendering .docx file accurately. The docx file has logos in header and watermark at the background which is not displayed correctly to the user. Steps taken to load the docx file in WKWebview: Stored the document data on app documents directory. Displaying the document file in WKWebView on mobile app with help of local document directory file path. Below is the code that renders the docx file: let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] let filePath = String(format: "%@/%@", documentsPath, "file.docx") let fileURL = URL(fileURLWithPath: filePath) docWebView.loadFileURL(fileURL, allowingReadAccessTo: fileURL) Has anyone encountered this issue? Please provide some assistance to resolve this issue.
2
0
273
Mar ’24
External link or PDF download doesn't work in PWA
Hi, We're currently developing a PWA for our company - with Vue 3 and Quasar - and we have added it into the App Store (but in testing only, for now). We have multiple problems but the worst is the following one: it seems that the app doesn't want to open external links with "window.open()" JS method. Instead it shows a screen with a progress bar and a crossed-out Wi-Fi icon. It shows this for a few seconds then once the progress bar is completly filled it goes back to the previous page where it triggered. Needless to say that the wireless is connected (see the status icons at the top). We have the same behavior when we try to download a PDF created as a BLOB file with some JS code. I don't have an iPhone to test so maybe you have a good idea about this ? Kind regards, V.
0
0
424
Feb ’24
iPad 10th generation top header text becomes invisible only in app initial launch.
I’m creating a hybrid app using Swift and Angular. Angular content is loading on top of the Native Swift WkWebView. Starting from iPad 10th generation only in the app initial launch header area become invisible(invisible means header text becomes white). But once I send the app to background and return to foreground header text becomes black and it will show without problem. I would really like to know whether this is a OS problem and if so is there any pro-grammatical solution for this? if anyone can guide me to proper way fix this much a appreciated!!! Environment: ・Device: iPad 10th generation ・OS:iPad OS 17.3.1 ・Native App : Swift 5
1
0
441
Feb ’24
macOS App Launch Fails with RunningBoard Entitlement Errors on WKWebView Video Play
I am developing a macOS application and have encountered an issue with entitlements that I am unable to resolve. The error emerges from the RunningBoard service when I try to play a video in a WKWebView. Here is the specific error: Error acquiring assertion: &lt;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)}&gt; I'm seeking answers to the following questions: What do the entitlements com.apple.runningboard.assertions.webkit and com.apple.multitasking.systemappassertions refer to specifically? How can I resolve the errors associated with the absence of these entitlements? This problem appears to affect many users, yet a public solution has not been identified. I've tried adding NSMicrophoneUsageDescription and NSCameraUsageDescription to my Info.plist, as suggested here, but to no avail. An apparent Apple employee suggested adding Background Modes to capabilities here, but such options do not exist. Numerous similar issues are documented online, but none provide a resolution. When I attempt to include the entitlements com.apple.runningboard.assertions.webkit and com.apple.multitasking.systemappassertions as indicated in the logs, my application fails to start, resulting in the following error message: Could not launch “My App Name” Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. The error logs are extensive and include: Could not launch “Quick Music Bar” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2024-02-24 06:26:22 +0000"; DVTRadarComponentKey = 968756; IDERunOperationFailingWorker = IDELaunchServicesLauncher; } -- The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. -- Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153 -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "Mac14,10"; "device_osBuild" = "14.3.1 (23D60)"; "device_platform" = "com.apple.platform.macosx"; "dvt_coredevice_version" = "355.7.7"; "dvt_mobiledevice_version" = "1643.60.2"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 113; "operation_errorCode" = 20; "operation_errorDomain" = IDELaunchErrorDomain; "operation_errorWorker" = IDELaunchServicesLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.macosx"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 8192; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "macosx14.2"; "sdk_osVersion" = "14.2"; "sdk_variant" = macos; } -- System Information macOS Version 14.3.1 (Build 23D60) Xcode 15.2 (22503) (Build 15C500b) Timestamp: 2024-02-24T15:26:22+09:00 The system information is as follows: macOS Version 14.3.1 (Build 23D60), Xcode 15.2 (22503) (Build 15C500b), Timestamp: 2024-02-24T15:26:22+09:00 Has anyone else encountered this issue, or can anyone provide guidance on how to proceed?
1
0
838
Feb ’24
WebView crash in iOS 17.4 beta4
The iOS 17.4 beta4 version was released this Tue(Feb.20). we received lots of web view crashes in this version. we have checkout our udpates we didn't do related code changes recently. Do you meet similar issues in your app? anyone can give some advices? Thanks By crash report in Xcode, the crash frame is WebKit: ***::Detail::CallableWrapper<WebKit::ProcessLauncher::launchProcess()::$_0::operator()(***::ThreadSafeWeakPtr<WebKit::ProcessLauncher>, _SEExtensionProcess*, ***::ASCIILiteral, NSError*) const::'la... + 2480 screenshot for the call stack is
4
0
1.7k
Mar ’24
WTFCrashWithInfo (WebKit) iOS 17.4
Hello there, we have an iOS application which has been out for quite some time with a custom WKWebView which has been throwing the following exception on the latest iOS 17.4 (Beta) The application appears to freeze / crash when interacting with input on a WKWebView. Our application also uses react-native, but up until this particular iOS version everything has been working smoothly (since about iOS 12.0 or so). Here is some more details on the environment iPhone 15 Pro (can reproduce on simulator as well) iOS 17.4 (Beta) Physical device * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x1a195a918) * frame #0: 0x00000001a195a918 WebKit`WTFCrashWithInfo(int, char const*, char const*, int) + 20 frame #1: 0x00000001a25ef8fc WebKit`-[WKContentView(WKInteraction) textInputTraits] + 288 frame #2: 0x00000001c77689c8 PencilKit`+[PKTextInputUtilities textInputTraitsFromTextInput:] + 112 frame #3: 0x00000001c7768be8 PencilKit`+[PKTextInputUtilities isResponderSupportedTextInput:checkForNotes:outTextInputTraits:] + 64 frame #4: 0x00000001c77d5128 PencilKit`+[PKTextInputElementsFinder isResponderEditableTextInput:] + 56 frame #5: 0x00000001c78f29a0 PencilKit`-[PKTextInputWindowFirstResponderController _updateFirstResponder:isVisible:sendDelegateCallback:] + 224 frame #6: 0x00000001c78f2dd8 PencilKit`-[PKTextInputWindowFirstResponderController _textInputResponderDidChangeNotificationHandler:] + 244 frame #7: 0x000000018c7b67a8 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 frame #8: 0x000000018c7b6170 CoreFoundation`___CFXRegistrationPost_block_invoke + 88 frame #9: 0x000000018c7b60b8 CoreFoundation`_CFXRegistrationPost + 440 frame #10: 0x000000018c7b5608 CoreFoundation`_CFXNotificationPost + 728 frame #11: 0x000000018b65ee10 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 92 frame #12: 0x000000018f63b02c UIKitCore`-[UIKeyboardImpl _postInputResponderChangedNotification] + 224 frame #13: 0x000000018f63c74c UIKitCore`-[UIKeyboardImpl _setDelegate:existingDelegate:force:delayEndInputSession:] + 480 frame #14: 0x000000018ebd4368 UIKitCore`-[UIKeyboardImpl setDelegate:force:delayEndInputSession:] + 664 frame #15: 0x000000018eb931a8 UIKitCore`-[UIKeyboardSceneDelegate _reloadInputViewsForKeyWindowSceneResponder:force:fromBecomeFirstResponder:] + 2916 frame #16: 0x000000018eb92604 UIKitCore`-[UIKeyboardSceneDelegate _reloadInputViewsForResponder:force:fromBecomeFirstResponder:] + 88 frame #17: 0x000000018f860ee4 UIKitCore`-[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 84 frame #18: 0x00000001a25f3cb4 WebKit`-[WKContentView(WKInteraction) _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:] + 1800 frame #19: 0x00000001a1f58024 WebKit`WebKit::PageClientImpl::elementDidFocus(WebKit::FocusedElementInformation const&, bool, bool, ***::OptionSet<WebCore::ActivityState>, API::Object*) + 108 frame #20: 0x00000001a1f8713c WebKit`WebKit::WebPageProxy::elementDidFocus(WebKit::FocusedElementInformation const&, bool, bool, ***::OptionSet<WebCore::ActivityState>, WebKit::UserData const&) + 168 frame #21: 0x00000001a252b9d0 WebKit`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 24380 frame #22: 0x00000001a263f628 WebKit`IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 264 frame #23: 0x00000001a20e9be0 WebKit`WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 44 frame #24: 0x00000001a263a690 WebKit`IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder>>) + 324 frame #25: 0x00000001a263abb0 WebKit`IPC::Connection::dispatchIncomingMessages() + 708 frame #26: 0x00000001a2887524 JavaScriptCore`***::RunLoop::performWork() + 204 frame #27: 0x00000001a288844c JavaScriptCore`***::RunLoop::performWork(void*) + 36 frame #28: 0x000000018c7be62c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 frame #29: 0x000000018c7bd8a8 CoreFoundation`__CFRunLoopDoSource0 + 176 frame #30: 0x000000018c7bc0b8 CoreFoundation`__CFRunLoopDoSources0 + 340 frame #31: 0x000000018c7bad88 CoreFoundation`__CFRunLoopRun + 828 frame #32: 0x000000018c7ba968 CoreFoundation`CFRunLoopRunSpecific + 608 frame #33: 0x00000001d0ecf4e0 GraphicsServices`GSEventRunModal + 164 frame #34: 0x000000018ec37350 UIKitCore`-[UIApplication _run] + 888 frame #35: 0x000000018ec3698c UIKitCore`UIApplicationMain + 340 frame #36: 0x0000000100499dec Padlet`main(argc=1, argv=0x000000016f96f708) at main.m:8:14 frame #37: 0x00000001b00fed84 dyld`start + 2240 Stack traces generated with bt command. The crash mentions PencilKit but afaik we aren't supporting that here. Any help would be greatly appreciated, many thanks!
2
0
1.1k
Feb ’24
Clarification on user gesture requirement for webauthn
Hi folks, I have a couple questions relating to the user gesture requirement on iOS, specifically regarding WebKit. From my testing, it looks like only one webauthn invocation without user gesture is allowed even if there's intervening user gestures, e.g. navigating to another page, clicking buttons, etc. I have to close Safari and reopen in order to reset the count. Is this expected behavior? It seems like it was originally supposed to be one per user navigation [1]. I see the user gesture requirement was removed recently [2]. I agree with the decision, but am curious what was the context behind this move as it seems like a reversal of https://webkit.org/blog/11312/meet-face-id-and-touch-id-for-the-web/. [1] https://bugs.webkit.org/show_bug.cgi?id=220897 [2] https://bugs.webkit.org/show_bug.cgi?id=264444
2
0
682
Mar ’24
WKWebView very slow on GC resulting App Crash
Hi Team, We are working on one of the Acute Healthcare Imaging application and application is running under WKWebview controller. We have observed many crashes when GC doesn't get executed in timely manner. This is very critical healthcare app which has direct impact on patient care. Appreciate any guidance or direction to force GC or optimized dereferenced objects. Thanks in advance for your attnetion. -RA
1
0
377
Feb ’24
In safari for IOS17 audio is broken
Hello community, first post I hope to meet the guidelines. I am developing a web site that uses a library that involves audio playback. This playback is accompanied by an animated canva, and in the IOS17 version in safari, this does not work. The audio is muted and the canva does not animate. However, in ios16 safari it works perfectly. I have also tried in safari on MacOs and ipadOs and it works, which makes me see that the problem is with ios 17 safari. The library in question is this: https://github.com/foobar404/Wave.js/ I don't think the failure is in the library since it works as I said in all other platforms. Specifically the code is here: https://github.com/foobar404/wave.js/blob/main/src/index.ts and makes me think that some HTML element is being incompatible. It is necessary to emphasize that in ios17 it does not work, but it does not appear any error in console. I would love to get help or know if this is a bug to report it.
0
0
645
Feb ’24
visionOS WKWebView FullScreen bug
I am having a problem when trying to implement a WKWebView in a window in VisionOS and that when trying to do it in full screen and exiting full screen, the size of the webview changes, becoming smaller or larger while the window remains the same size as before. I used webView.configuration.preferences.isElementFullscreenEnabled = true for enabling fullscreen mode. I made a simple code to test this. import SwiftUI @main struct TestApp: App { var body: some Scene { WindowGroup() { ContentView() } } } import SwiftUI import WebKit struct WebView: UIViewRepresentable { let url: URL func makeUIView(context: Context) -&gt; WKWebView { let wkwebView = WKWebView() wkwebView.configuration.preferences.isElementFullscreenEnabled = true let request = URLRequest(url: url) wkwebView.load(request) return wkwebView } func updateUIView(_ uiView: WKWebView, context: Context) { } } struct ContentView: View { var body: some View { WebView(url: URL(string: "https://glitch.com/~fullscreen-test")!) } }
2
0
850
Mar ’24
Safari on macOS does not update the SDR/HDR information about the display on which it is displayed
I have noticed that Safari on macOS does not update the SDR/HDR information about the display on which it is displayed if you refresh the page. Specifically if I use this query and set my MacBook Pro monitor to XDR the result will be "HDR true", but if I then set the monitor to a non-HDR mode like "Photography P3" and refresh the page the result is still the same. The only way is to close the tab, open a new one and launch the query again. This behaviour does not happen with chrome for example, a simple page refresh is enough. The problem in common use can be found on YouTube with an HDR video. If the YouTube player page is already loaded and you change the monitor settings (from SDR to HDR or vice versa), you are forced to close and open a new browser window to have the player loaded with the correct video format. You can check this behavior directly on the site I developed for the HDR test wide-gamut.com It would definitely be more efficient if this information was updated simply by reloading the page.
1
0
289
Feb ’24