Hello,
Is it possible to take a screenshot of a non-active tab? Firefox supports this via captureTab (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/captureTab)
With Safari App extensions that was possible via getScreenshotOfVisibleArea which doesn't seem to work with Safari extensions.
General
RSS for tagExplore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.
Post
Replies
Boosts
Views
Activity
I recently noticed that using Google Docs, Google Sheets, and any other Google-related sites on a Safari browser uses tons of RAM. It usually consumes around 4-5 GB of RAM.
Compare it to when I use Google Docs on Chrome; it only uses around 1-2 GB.
Why is this so? I want to use Safari alone for work, but it's so slow. Do you have any tips on this?
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
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, WTF::OptionSet<WebCore::ActivityState>, API::Object*) + 108
frame #20: 0x00000001a1f8713c WebKit`WebKit::WebPageProxy::elementDidFocus(WebKit::FocusedElementInformation const&, bool, bool, WTF::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`WTF::RunLoop::performWork() + 204
frame #27: 0x00000001a288844c JavaScriptCore`WTF::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!
Hey,
I am developing Safari Web Extension and trying to communicate with the swift handler (SafariWebExtensionHandler) using runtime.sendNativeMessage api (as describe here - https://developer.apple.com/documentation/safariservices/safari_web_extensions/messaging_between_the_app_and_javascript_in_a_safari_web_extension). I'm getting the following error when calling it -
calling runtime.sendNativeMessage(): Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application."
I have no Idea what is missing and couldn't find any meaningful error message anywhere. I do have nativeMessaging permission in my manifest.json. Assist will be appreciated.
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: WTF::Detail::CallableWrapper<WebKit::ProcessLauncher::launchProcess()::$_0::operator()(WTF::ThreadSafeWeakPtr<WebKit::ProcessLauncher>, _SEExtensionProcess*, WTF::ASCIILiteral, NSError*) const::'la... + 2480
screenshot for the call stack is
Hello,
The iOS 17.4 update brings changes to the PWA experience for EU residents. I'm in NA and would like to test my PWA on my iPhone as if I'm an EU resident.
I found this article about changing an account's location. https://support.apple.com/en-euro/HT201389
Will that work, and if not, is this possible?
Thanks,
Ryan
Firebase JS SDK require Notification check so we are added. But its not working in iOS and iPad.
Version: 17.3.1
Working MacOS Safari 17.3.1
I need to remove the Safari Smart Banner from on top of the safari browser, for this , i have remove the meta tag from the head of the website
However, the banner still continue to show up on the Safari browser. Can you please tell me what are the steps to remove the banner from showing up on the Safari and what changes would be required ?
Is there any way to configure SFSafariApplication.dispatchMessage to send a message to the web extension from a specific profile?
According to the documentation , using SFExtensionProfileKey, the native app can determine the profile that sent a message.
Can SFSafariApplication.dispatchMessage send a message to a specific profile? The default behavior seems to be to send the message to all profiles.
I've been having a hard time getting WebXR testing working in VisionOS. I had Ventura and installed VisionOS 1.0 and video crashed launching to WebXR. To get 1.1 I did alot of jumps to get XCode 15.3 beta and VisionOS 1.1 requiring to also upgrade to macOS Sonoma.
In Ventura I was able to web inspect Safari in VisionOS 1.0 but in Sonoma, and VisionOS 1.1 I get "No Inspectable Applications"
I have tried Safari and Preview Safari.
Since going in the beta I have had problems uploading images to a WordPress site. This occurs with Safari and Chrome. There is no issue using my iPhone to upload to the same WordPress site and the support team at the hosting service have no issues uploading the same images I fail with using Windows systems. It is not consistent. The same file that has uploaded can later fail to upload after one or more files have failed to upload.
Very small images (5-20k) usually upload but larger than that and I start to get fails. When uploading to a different WP site I get uploads succeeding but the images are corrupt. But here aI also gett no issues using my iPhone uploading to the same site.
Hello,
I've encountered an issue with the scrollbar functionality on my webpage specifically when accessed through Safari. Despite its functionality on other browsers and devices, Safari on iOS 14 displays only the native scrollbar during scrolling, contrary to the desired behaviour of consistently showing the scrollbar.
&::-webkit-scrollbar {
height: 2px;
}
&::-webkit-scrollbar-track {
background-color: "white";
margin-left: 4px;
margin-right: 4px;
}
&::-webkit-scrollbar-thumb {
background: "orange";
}
}
As far as I can determine, there is no way to save the data in my Safari App Extension when Safari terminates. It seems I have to save the data every time the page changes. That's wasteful. Does anyone know of a work around?
Subject: Apple Developer Ticket: Issue with Web Page Loading Timeout after iOS 17.0 Update
Description:
I am writing to report an issue that arose after the recent iOS update to version 17.0. Since the update, users accessing our web page via Chrome and Safari browsers on iOS 17.0 and later are experiencing loading timeouts.
Problem Details:
Issue: Failed to load resource due to request timeout.
Affected Browsers: Chrome and Safari on iOS 17.0 and later.
Working Versions: The web page functions correctly on iOS versions 16.1 to 16.4.
Web Page Content: The web page includes JavaScript and Ajax calls.
Steps to Reproduce:
Access the web page using Chrome or Safari browser on iOS 17.0 or later.
Observe the loading timeout error.
Additional Information:
The issue seems to be related to a change in the way iOS 17.0 handles JavaScript and Ajax calls.
We have tested the web page on multiple devices running iOS 17.0 and encountered the same problem consistently.
No changes were made to the web page's codebase prior to the iOS update.
Expected Resolution:
We kindly request Apple's assistance in identifying and resolving the root cause of this issue. Our aim is to ensure compatibility with the latest iOS versions and provide a seamless user experience for our customers.
Thank you for your prompt attention to this matter. Please let us know if you require any further information or assistance from our end.
Safari Browser killing Long Running API requests after 60 seconds.
Do we have any way to increase a timeout limit?
Trying to test application using the WebXR features of Safari on Vision Pro. The colors of the objects in the scene when viewed in the normal Safari window look correct. Upon entering immersive mode all the colors are washed out. I've read reports of this issue elsewhere on the web with no cause or solution given. What could be causing this? The Vision Pro is running visionOS v1.0.3.
The SFSafariViewController documentation mentions not to display content from websites when using the pageSheet and formSheet presentation styles for the In-App browser.
Is this a hard restriction that is enforced or more of a loose guideline? And if possible, providing the reasoning behind it would be great.
Thanks in advance.
I'd like to place a search bar of top of the main window of my visionOS app. It should look similar to Safari's search bar, and also show search results as the user types. How can this be accomplished?
We have a payment process in an app which involves loading up a Web page to allow a user to enter credit card details, and to complete a transaction. This web page may result in a 3D-Secure step up challenge. For PCI compliance purposes we launch this in a SFSafariViewController.
This 3D secure process involves a collection of redirects, with a final one back to us known as the "Merchant Page". In here, we want to do one more redirect, using a custom URL scheme, to allow the app to recognise that the process has completed, and can safely dismiss the SFSafariViewController.
In those cases where no "step up 3d challenge" occurs, the process works well, the final redirect occurs, and our app successfully dismisses the SFSafariViewController.
However, in a step up challenge, the Merchant Page loads, but any attempt to do the final custom redirect does not execute.
I believe this is a feature of Safari - What I think is going on is that enough time has passed since there was user interaction on the page, and the final redirect, which isn't a https or http link (it is a myapp:// link) simply gets ignored.
We've tried a lot of things. One thing works: If we provide a button, and when it is tapped, it sets window.location.href = 'myapp://success?', this works.
This is a clue to if it is cause by lack of user interaction.
We've tried lots of things:
Rather than a javascript redirect, we tried server side redirecting; we tried all of the HTTP 300 response codes. They were all ignored
We tried the meta refresh (which we know is kinda deprecated).
We tried window.location.href = , window.location.assign(), document.location.href, document.location.assig(), etc.
We tried issuing an Ajax XMLHttpRequest, but this failed because it isn't https or http
We even tried to suggest our non-standard URL was the source of a script, just to trigger it but it didn't work.
We've tried calling in during body onload
We've tried calling it using a timeout in case timing was relevant.
My gut feeling here is this is a feature. I've used Safari Debugging, and it literally steps over the window.location.href assignment, and doesn't produce a warning or an error. We've added try/catch, and no exception was thrown. Again, it leads me to believe this is all by design (perhaps to prevent ad fraud or something?).
I was kinda hoping that in the response, we'd be able to specify a CORS header that tells the browser that "it will be ok to use resources from myapp://", but haven't found the right one.
We may end up having to simply produce a button with a message "Your transaction has completed, please press here to dismiss", but it is terrible UX that is unnecessary.
I've seen a number of posts elsewhere suggesting that redirects without user interaction can be considered suspicious, and I've experience of this same problem on another browser.
If anyone has cracked this one, I'd love to know how