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

General Documentation

Post

Replies

Boosts

Views

Activity

declarativeNetRequest modifyHeaders support in Safari macOS (17.1(19616.2.9.11.7))
Is declarativeNetRequest with action type modifyHeaders supported in safari web extension? To modify request headers with declarativeNetRequest, I just modify the manifest.json as below. { "manifest_version": 3, .... "permissions": [ "declarativeNetRequest", "declarativeNetRequestWithHostAccess", "activeTab" ], "declarative_net_request": { "rule_resources": [ { "id": "ruleset_for_extension", "enabled": true, "path": "rules.json" } ] }, "host_permissions": [ "<all_urls>" ], "background": { "service_worker": "background.js" }, "content_scripts": [{ "js": [ "content.js" ], "matches": [ "*://www.acmicpc.net/*" ] }], .... } And rules.json is as follows { "id": 1, "priority": 1, "action": { "type": "modifyHeaders", "requestHeaders": [ { "header": "sec-fetch-dest", "operation": "set", "value": "document" }, { "header": "sec-fetch-mode", "operation": "set", "value": "navigate" } ] }, "condition": { "domains":["acmicpc.net"], "resourceTypes":["xmlhttprequest"] } } It builds successfully but not modify headers with as intended even though the permission in safari is enabled.
0
0
237
Jul ’24
iOS:Open a Welcome Page in Safari, not CNA (post-authentication)
"When I connect a device to a special Wi-Fi network, I want users to authenticate themselves. The authentication page is opened using CNA (Captive Network Assistant) on iOS, but CNA has limitations and does not meet my needs. Is it possible to directly launch Safari after connecting to Wi-Fi? Or, can the CNA page have a button or link that quickly redirects users to Safari? How should I proceed?"
4
0
237
Jul ’24
WebKit crash with iOS 18 beta3 and beta4
We are encountering a crash that occurs more frequently on iOS 18 beta 3 and beta 4. The crash happens suddenly after startup and does not provide a detailed code stack trace. Additionally, we have noticed that WebKit has a new version with fixes available. Could you let us know when this update will be released? webkit has fix this crash: https://github.com/WebKit/WebKit/commit/03200a8c08079e188c3de7a97109a51202cc6c64 https://bugs.webkit.org/show_bug.cgi?id=276620 Thread 1 Queue : com.apple.main-thread (serial) #0 0x00000001921c7008 in objc_msgSend (). #1 0x00000001f2848938 in **::Detail::CallableWrapper<WebViewRenderingUpdateScheduler::WebViewRenderingUpdateScheduler(WebView)::$_1, void>::call() () #2 0x0000000194e7bf74 in CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION (). #3 0x0000000194e7bd18 in __CFRunLoopDoObservers (). #4 0x0000000194eaac80 in __CFRunLoopRun () #5 0x0000000194eaa4c8 in CFRunLoopRunSpecific (). #6 0x00000001e172d1c4 in GSEventRunModal (). #7 0x00000001979f4a90 in -[UIApplication _run] () #8 0x0000000197aa2d1c in UIApplicationMain (). #9 0x00000001023f4064 in main at /Users/Dragon/Desktop/App/qrn-ios//main.m:14. #10 0x00000001bb60e9b4 in start (). detail info is below: SIGSEGV: 0xffffff81ece07608 0x0 + 8268181504 main. 0 0 0x00000001018de5c8 -[CKCrashReporter recordCrashWithSignal:]. 1 1 0x00000001018e15cc SignalHandler. 2 2 libsystem_platform.dylib 0x000000021716fafc 93D52E6D-C21D-3BC4-9C49-EBF71987F78C + 8977309696 3 3 WebKitLegacy 0xffffff81ece07608 0x0 + 8268181504. 4 4 WebKitLegacy 0x00000001ece07608 5BEE83EA-6DB3-357D-A484-0555DAE5C1B8 + 8268181504. 5 5 CoreFoundation 0x000000018fbd6e14 7AD2298D-5B8F-3AF4-9EED-B09B8E0A9653 + 6706372608. 6 6 CoreFoundation 0x000000018fbd6bb8 7AD2298D-5B8F-3AF4-9EED-B09B8E0A9653 + 6706372608. 7 7 CoreFoundation 0x000000018fc05bd8 7AD2298D-5B8F-3AF4-9EED-B09B8E0A9653 + 6706372608. 8 8 CoreFoundation 0x000000018fc05368 CFRunLoopRunSpecific + 6706372608. 9 9 GraphicsServices 0x00000001dbdf81c4 GSEventRunModal + 7983820800. 10 10 UIKitCore 0x00000001927529b0 D2E47210-1C46-3CA7-BBC2-35021B146A13 + 6748045312. 11 11 UIKitCore 0x00000001928 00d54 UIApplicationMain + 6748045312. 12 12 0x00000001000b4080 main. 13 13 dyld 0x00000001b5e40734 94AF19E0-4F2A-332F-A08C-04B9B7CB6FAC + 210740.
1
2
576
Jul ’24
Hardware acceleration safari on iOS/iPadOS
I would like to introduce by saying this is one of the things we need as users to use our devices in a good way. This can help fix issue. This allows for more uses for the devices. also would like a all desktop mode safar where I actually get the proper desktop websites on my devices. You know what I am talking about. some websites have mobile or desktop versions and some don’t and where it doesn’t have it. The platform safari is trying to push it into a mobile site making the website broken in functionality
0
0
286
Jul ’24
apple sso login stops to work
this.app.on('button:AppleSSO', async function () { this.app.fire('UI:LOADING', true); this.signInSSOElement.enabled = false; console.log('start apple login'); let redirectURI = 'https://account.ohhh-inc.com'; AppleID.auth.init({ clientId : 'com.ohhhinc.sso.service', scope : 'email', redirectURI : redirectURI, responseType: 'code', responseForm: 'formpost', state : Date.now().toString(), nonce : 'ohhh.incisaperfectdeveloper', usePopup : true }); try { const data = await AppleID.auth.signIn(); // Handle successful response console.log('Apple login successful:', data); } catch (error) { this.app.fire('UI:LOADING', false); // Handle error console.log('apple login error : ', error); this.app.fire("UI:Free"); if(UserManagement.instance.mode == "Gallery") { this.app.fire('MUSEUM:ToggleUI'); this.app.fire('UI:EnableHambMenu'); } this.app.fire('enableUserButton'); LoginCamille.instance.returnFireEvent = undefined; this.app.fire('login-int:close', { result: 'failed', msg: 'Apple login error.\nPlease try another SSO'}); } }, this); we are using javascript to initiate apple sso login. It doesn't work. with error. ccess to font at 'https://appleid.cdn-apple.com/appleauth/static/bin/cb3432457731/dist/assets/shared-icons.woff' from origin 'https://appleid.apple.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I am not sure where I should change
1
0
243
Jul ’24
Apple SSO doesn't work anymore
this.app.fire('UI:LOADING', true); this.signInSSOElement.enabled = false; console.log('start apple login'); let redirectURI = 'https://account.ohhh-inc.com'; AppleID.auth.init({ clientId : 'com.ohhhinc.sso.service', scope : 'email', redirectURI : redirectURI, responseType: 'code', responseForm: 'formpost', state : Date.now().toString(), nonce : 'ohhh.incisaperfectdeveloper', usePopup : true }); try { const data = await AppleID.auth.signIn(); // Handle successful response console.log('Apple login successful:', data); } catch (error) { this.app.fire('UI:LOADING', false); // Handle error console.log('apple login error : ', error); this.app.fire("UI:Free"); if(UserManagement.instance.mode == "Gallery") { this.app.fire('MUSEUM:ToggleUI'); this.app.fire('UI:EnableHambMenu'); } this.app.fire('enableUserButton'); LoginCamille.instance.returnFireEvent = undefined; this.app.fire('login-int:close', { result: 'failed', msg: 'Apple login error.\nPlease try another SSO'}); } }, this); We are doing Apple SSO in Javascript. But we have error : Access to font at 'https://appleid.cdn-apple.com/appleauth/static/bin/cb3432457731/dist/assets/shared-icons.woff' from origin 'https://appleid.apple.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I don't know how to fix this.
1
0
254
Jul ’24
Multichannel Audio App not working on safari
Hi! I am working with a team in developing a multichannel based audio web application. The whole structure is based on multiple tracks playing in sync, so after some research and failed attempts, we ended up going with the solution of having one audio buffer (HTMLAudioElement), containing a multichannel file (specifically 8 channels) that we play, split the channels, process them separately, and play the result back to the user. We started doing this with multichannel wav files, and it worked great but every playback was way too large to be scalable, so we started looking into other multichannel-capable files. So far we have tried aac, opus and webm, none of which has worked properly in safari. I've looked in the apple developer documentation, HLS and all that, and seems like the only option is eac3, but I haven't been able to convert any of my files to that format, and I have been really trying. The other option we have been exploring is decoding opus files with WASM manually, but with little success to date. Has anyone been able to achieve anything similar to this? Thanks!
0
0
274
Jul ’24
Low Version Safari Browser When Download Excel Issue
Hi everyone, when My project (Angular 5) running in Safari Browser, we have a download function, it's download the excel file, end with .xlsx, but when running in low version Safari version, it will have a popup, that is not my project did, it blocked be safari itself, you can check the image, my question is how to hide the 'View' button or directly download instead of show the popup?
0
0
278
Jul ’24
Trying to mimic visionOS UI inside of WKWebView
I'm trying to mimic glossy, semi-transparent blurry backgrounds for my visionOS app inside of WKWebView It's easy to do for menus like on the screenshot below, using semitransparent background and applying backdrop-effect: blur(20px) The problem I have is when I make the whole window like this by specifying webView.isOpaque = false and applying to body background-color: transparent. In this case, suddenly, the backdrop-effect: blur stops working for menu. See picture below: You can clearly see that blur is not working anymore since you can see 3 dots behind the menu. I did not touch any CSS properties for the menu itself, only making the whole window semi-transparent. Is there any workaround for this problem? For me it's a blocker to make UI to feel native to visionOS.
0
0
296
Jul ’24
Cannot navigate to external webpages from internal extension pages
In iOS 18, internal extension pages cannot navigate to external webpages, either via href links or through JS methods such as window.location.replace. Nothing happens when you try to navigate to an external webpage. Only other internal pages can be navigated to. This wasn't an issue on previous versions of iOS. It would be appreciated if this can be fixed as soon as possible. Feedback ID: FB14194963
3
1
652
Jul ’24
Web Extensions's background page is missing in the Develop -> Web Extension Background Content menu in the latest Safari Technology Preview
Hello! I was wondering if any other developers are experiencing issues with accessing the web extension background script console, sources, etc. on the latest Safari Technology preview or macOS Sequoia betas. We have an extension which has a persistent background script. In the latest public release of Safari version 17.5 (19618.2.12.11.6) on macOS Sonoma, everything works as expected. When I enable developer mode in Safari, it shows an additional "Develop" menu and when I select "Web Extension Background Content" in the dropdown, it shows a list of background pages for all installed extensions. Attaching a screenshot for reference. However, if I install the latest Safari Technology Preview 197 on macOS Sonoma or just test with the Safari version that comes with MacOS Sequoia beta 1 or beta 2, the "Web Extension Background Content" dropdown menu does not list any background pages. Attaching a screenshot for reference. We started discussing the issue with Apple during the latest WWDC. If anyone at Apple sees this post, I opened FB13834388 to track this issue. However according to Apple, they cannot reproduce the issue exactly as I see it on all macOS machines around me including clean virtual machines, real hardware (MacBook Pro M1 Max, MacBook Air M2, MacBook Pro Intel based). The "Web Extension Background Content" menu looks as expected on their end which is very confusing to me... I have a reason to believe that new Safari's developer tools are simply broken in the latest release. I base that statement on the fact that I cannot access it in case of our own Safari extension, Apple's sample "Sea Creator" extension and a few random extensions that I got from the App Store. I was wondering if anyone else can observe the same behavior or all machines around me are haunted :) Please share if you have similar issues with Safari Technology Preview 197 or Safari on the latest macOS Sequoia beta. Any feedback is important to us. If it's a widespread issue, then Apple should prioritize is accordingly. If the issue is somehow specific to our testing, we will fix it on our side. But any test results at this point are bringing more clarity to the situation and are highly appreciated.
4
0
579
Jul ’24
"Font size adjustment feature" in Safari Browser.
Does anyone have experience with the "font size adjustment feature" in Safari? I am encountering an issue where this feature increases the zoom on all text elements despite my attempts to prevent it and no able to scroll. Here are the methods I have tried so far: Media Queries: I added various media queries to control the font size and layout at different screen sizes, but this did not resolve the issue. Meta Viewport Tag: I included the "user-scalable=no" property inside the meta viewport tag to disable user scaling, but it had no effect. CSS Property: I applied the CSS property "-webkit-text-size-adjust: 100%;" to prevent automatic text size adjustments, but the problem persists. Despite these efforts, Safari continues to increase the zoom on all elements. Does anyone have any insights or solutions to effectively address this issue?
0
1
231
Jul ’24
WKWebView login session remains active when app is killed and relaunched.
In our application, we have a button on click of which we are creating a new WKWebView instance and before loading the url clearing website data using WKWebsiteDataStore removeDataOfTypes method to remove allWebsiteDataTypes. The problem is when app is relaunched, the login session remains active whereas the same code ends session and we get login page when the same button is clicked when app is in running mode and not killed. Any suggestion on how to debug or what's going incorrect is really appreciated. Let me know incase of query. Thanks!
0
0
199
Jul ’24
WKWebView for general purpose web browser
I created a simple web browser using WKWebView, but as far as I can tell, there is not a way to auto-populate credentials or save credentials a user enters into a login form at a 3rd-party website like Netflix (i.e., not my own app domain). Is this correct? If this is wrong, what are the APIs to support this? My use case is that I want to create an immersive app in visionOS that includes a window that lets the user surf the web (among other things). Ideally, I could just use a Safari window in my immersive app, but I don't think this is possible either. My work around is to create my own web browser... which works, minus the credential issue. Is it possible to bring a Safari window into an immersive visionOS app's experience? (IMHO, that would be a great feature)
0
0
363
Jul ’24
TypeError in FormMetadata.js: null object error on iOS 17.5+ Safari
I'm encountering a TypeError in FormMetadata.js on Safari, primarily affecting iOS 17.5 and later versions. The error message is as follows: TypeError: null is not an object (evaluating 'this._logicalFormForControl(e).formElement') This issue seems to be specific to recent iOS versions, particularly on Safari. Has anyone else experienced this problem or have insights into what might be causing it? Any suggestions for potential workarounds or fixes would be greatly appreciated. Additional details: Occurs consistently on iOS 17.5+ devices Mainly affects Safari browser Error is thrown in FormMetadata.js Thank you in advance for any help or information you can provide.
0
2
371
Jul ’24
iOS 16, iOS 17, MacOS Sonoma, Safari 17.5, permissionStatus.onchange not working
navigator.permissions.query -&gt; permissionStatus.onchange is Supposed to listen to the event of a change in permissions in the browser settings. This works for all browsers, but in Safari for iOS and MacOS this seems to be broken in the currently recent versions 17.x Example: navigator.permissions.query({ name: 'notifications' }).then((permissionStatus) =&gt; { permissions = permissionStatus.state; // this value gets set correctly permissionStatus.onchange = () =&gt; { // This will not get executed when permissions have been changed // within the safari settings app, or iOS Settings for PWA or Safari }; }); Can someone from Apple's Webkit Team please comment on this? Thank you. T.
2
1
557
Jun ’24