Safari is the web browser developed by Apple and built into all Apple devices.

Posts under Safari tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

[WebXR] Support for AR module in VisionOS 2.x
Thank you again for pushing the web forward in VisionOS 2, super exciting! The latest WWDC24 video touched on VR experiences for VisionOS2.0 using WebXR, however there was no mention of passthrough AR experiences. Samples such as this one are not supported: https://immersive-web.github.io/webxr-samples/immersive-ar-session.html In Settings > Safari, there is a feature flag for the AR WebXR module, but enabling it did not seem to change anything. Is this the expected behavior at this time? Any developer preview(s) we could try?
2
1
136
16h
Safari Web Extension background script becomes unresponsive after 30 seconds
I'm experiencing a Safari Web Extension issue where the non-persistant background script seems to crash after 30 seconds even when the content script is messaging it. Here is a minimal-reproducible example. When running in an emulator, the background script will stay responsive forever. However, when running on a physical device, the background script becomes non-responsive after 30 seconds of activity. It never becomes responsive again until I toggle the extensions enable/disable toggle, after which it stays active for 30 seconds and then crashes again.
2
1
471
1w
SFSafariViewControllerDelegate not being called for redirects
This method does not seem to work consistently: SFSafariViewControllerDelegate.safariViewController(_ controller: SFSafariViewController, initialLoadDidRedirectTo URL: URL) It was working 100% of the time until this week for me, now it has about a 1-5% success rate for detecting redirects. The docs are not clear: @discussion This method may be called even after -safariViewController:didCompleteInitialLoad: if the web page performs additional redirects without user interaction. Code snippet from calling UIViewController that conforms to SFSafariViewControllerDelegate: let config = SafariViewController.Configuration() config.entersReaderIfAvailable = false let vc = SFSafariViewController(url: url, configuration: config) vc.delegate = self self.safariViewController = vc print(self.safariViewController?.delegate) self.present(vc, animated: true) Did something change? How can I make this consistent again?
1
0
175
1w
iOS 17.5.1 safari extension - background scripts not working properly
We had developed an iOS Safari web extension (which uses non-persistent background scripts) that functioned properly until iOS 17.3. However, I've encountered inconsistent behavior on iOS 17.4.1, 17.5, and 17.5.1. Upon further debugging, I noticed that the background scripts often become idle and are unloaded frequently. They are not loaded again even for the registered webNavigation events and only trigger when interacting with the extension popup menu. This is also mentioned here. I had tried this in both manifest versions 2 & 3. I had tried using service_worker for background scripts. But, none of it seems to resolve this issue. Could you please clarify if this is a bug or an intended behavior? Our extension relies on webNavigation events without users having to interact with the popup menu often.
0
3
207
1w
Safari crash when open tab in preview.
Hello there. 👋🏻 Recently I updated macOS and Safari to latest versions. And after that, Safari crashed randomly, but exactly when I open tab in preview by long tab on link. I tried uninstall all extensions and clean all caches and another trash – it not helps me. Any idea? Thank you in advance!
2
1
473
2w
Browser.permissions.request not working as expected
Hi there - I am trying to port over Chrome extension over to Safari Web extension. Looks like Safari has a very aggressive permissions flow which isn't a great user experience but I get the privacy benefits. I am trying to move some of my permissions like <all_urls> or tabs as optional permissions and build a flow where I can request the user for them in hopes that i can educate them as to why I need them similar to how Chrome/FF have it. However when i use browser.permissions.request - i always end up getting true without invoking the prompt. The prompt seems to come up regardless when i start visiting a website. Can someone help with this? Sounds more like a defect in Safari.
2
0
1.1k
2w
It's not possible to open a link in a new tab on a page with the "safari-web-extension://someurl..." protocol
I have an extension that opens the start page after installation with the URL: safari-web-extension://my-web-extension-page.html It's not possible on this page to open any link on a new tab if the link has attribute target="_blank" or even with "Command (⌘) + click" combination Are there any restrictions on pages with protocol safari-web-extension://?
2
1
569
3w
Fairplay on M2/M3 MacBook's not honouring lease duration in license
Doing some testing around player behaviour when a license expires in Safari on MacOS. I had the following outcomes: On Safari 17.4.1 on an intel based Mac running Ventura, playback stopped when the license expired. On Safari 17.4.1 on an M3 running Sonoma, playback stalled briefly, and then continued to play unlimited. On Safari 16.5.2 on an M2 running Ventura, playback stalled briefly, and then continued to play unlimited. When playback stalled briefly, was at the time the license expired. I parsed the license and everything is set correctly for a lease license type: { "version" : 1, "payloadLength" : 1072, "iv" : "0H9NCXLQeh1ziYpmJXsnwQ==", "assetId" : "䙁㉌䉃\u0000\u0000\u0000", "hdcp" : "TYPE_0_REQUIRED", "contentKeyDuration" : { "leaseDurationSeconds" : 300, "rentalDurationSeconds" : 0, "persistenceAllowed" : false }, "keyType" : "Lease" } I cannot find any information relating to this behaviour. Per the docs for FPS, a lease license type: If the content key is not renewed, the Apple device stops the playback when the lease expires. Which is what is observed on the intel based macbook.
0
0
186
3w
iOS 17.4.1 Safari extension issues
Since updating to iOS v17.4.1 our safari extension no longer functions as it used to We are experiencing issues where our content script is not getting initialized, On devices running iOS 17.4.1, the content script included in our extension does not appear to run. There are no logs from the content script in the console, whereas on other versions and devices, it operates as expected. Our Extension relies con communication between the background and content scripts in order for us to render various popups to our users, based on our logs as of iOS 17.4.1 this communication is not successful, we can see messages being sent from the background script but as mentioned above nothing on the content script side. This behavior happens majority of the time and on random sites, sometimes opening the same site in a new tab would work but not always. There are also times where we would only receive our popups after opening the safari menu and interacting with our extension via this menu. Please assist with a way forward
15
3
1.9k
3w
In iOS version 17.4 and above, HTML rendering appears abnormal lines after refocusing
In iOS version 17.4 and above, we have observed that the following code works fine upon the initial opening. However, after minimizing the page and reopening it, there is a chance of encountering issues with abnormal lines. Please note the reproduction conditions: try minimizing the page, opening other apps, and then reopening it multiple times. The code is in the comments section. first time: After minimizing and reopening...
16
3
753
3w
Inconsistent Caching Behavior for MP3 Files in Safari Despite Proper Cache-Control Headers
I'm working on an Angular application that retrieves static data (JSON, MP3, and images) from a backend server, with a cache control response header set to Cache-Control: public, max-age=2592000. I expect these files to be served from either disk or memory cache after the initial request. However, in Safari, the browser sometimes fetches the data from the cache and other times makes a network call. This inconsistent behavior is particularly noticeable with MP3 files, whereas JSON and image files are consistently served from the cache as expected. I've tested this on multiple Safari versions and observed the same issue: Version 17.2 (19617.1.17.11.9) Version 17.1 (19616.2.9.11.7) Version 17.3 (19617.2.4.11.8) I confirmed that the "Disable Cache" option is not enabled in the developer tools, so the MP3 files should be cached. This functionality works correctly in Chrome and Firefox without any issues.
0
0
197
4w
iOS17.4.1 canvasをクリアしても特定の操作で描画が復活します
【現象】 Safariブラウザでcanvasに対して任意の描画をした後、clearRect()を実行します。 その後、canvasの親divに対して visibility: hidden を設定すると、消したはずの描画が復活します。 但し、親divは正常に visibility: hidden が働いているので描画されなくなります。 また、この現象はブラウザの拡大率が影響をしているようです。 少なくとも後述のリスト内のMacbookAirでは、拡大率が100%の場合にのみ発生しています。 この現象は過去のバージョンでは起きてないようです。 このバグを修正する予定はありますか? 【機種】 機種は以下のリストを確認してください。 Model OS&Version Y/N version MacbookAir M2 2022 macOS Sonoma 14.4.1 y 17.4.1 Mac Studio 2022 Apple M1 Max macOS Monterey 12.5 n 16.0 MacBook Air M1 2020 macOS Sonoma 14.3.1 n 17.3.1 iPadPro gen6 iPadOS 17.4.1 y - iPad gen10 iPadOS 17.4.1 n - 【デモ】 現象を確認するためのデモは以下のHTMLファイルを保存してブラウザで開いてください。 再現手順はボタンを draw -> clear -> hide の順番に押してください。 黄色の親divが非表示になるのに対し、canvasからclearしたはずの黒い四角が表示されます。 <html> <body onload="onLoad()"> <div id="parent" style="background-color: yellow;"> <canvas id="canvas"></canvas> </div> <button onclick="drawCanvas()">draw</button> <button onclick="clearCanvas()">clear</button> <button onclick="showCanvas()">show</button> <button onclick="hideCanvas()">hide</button> <script> let parent let canvas let context2d function onLoad() { parent = document.getElementById("parent") canvas = document.getElementById("canvas") context2d = canvas.getContext('2d') } function drawCanvas() { context2d.fillRect(0, 0, 100, 100) } function clearCanvas() { context2d.clearRect(0, 0, canvas.width, canvas.height) } function showCanvas() { parent.style.visibility = "visible" } function hideCanvas() { parent.style.visibility = "hidden" } </script> </body> </html>
1
0
237
4w
For a Mac Safari web extension, how to actually implement IAP?
I want to implement in-app purchases for my Mac Safari web extension. I can think of two ways: Draw the payment UI in an extension web page, and send a message to the native extension app to call StoreKit code. Open the container app from an extension web page, where the app draws the payment UI. I couldn't make #1 work with either StoreKit 2, which is async, and context.completeRequest(returningItems:) doesn't want to be called in a Task, saying context is not sendable) or StoreKit 1, where calling context.completeRequest(returningItems:) in paymentQueue(_:updatedTransactions:) for some reason doesn't return a response to the extension's web page. I couldn't make #2 work because I couldn't find a way to open the container app from the web extension. I registered a custom URL for my container app, but context.open that url does nothing. Web extensions that use IAP with #2 are available on the Mac app store, so it must be possible, could anyone shed some light on how to open the container app and pass the purchased info to the extension web page even if the container app is not open? Thanks in advance.
0
0
181
May ’24
Cannot find duplicate root CA for development Safari claims to have
I use three Macs for development of a web application. On each of the Macs (macOS 14.4) I used mkcert to install a local CA and to issue developer certificates (all separately). Accessing the web app with https://localhost:8080 works fine on two Macs with all browsers, but on one Mac Safari claims to have another root CA for localhost which it does not trust. And I cannot override the trust settings. Using Keychain Access I do not find this certificate. Safari shows it like this: Scrolling down I can see DNS Names localhost, localhost.localdomain and lvl.me, so I suspect it is a leftover from trying to install a root CA before using mkcert. The mkcert certificate looks like this and I can see it in the System keychain: So Safari complains and I cannot tell it to trust the server certificate as the CA does not fit (I think). Firefox and Chrome open the website just fine after warning me and me telling them to do so. I tried to find the wrong CA using Keychain Access and Terminal (security find-certificate -a -c localhost, security find-certificate -a -c lvh...) but in vain. Where can I find this certificate and how can I delete it?
2
0
442
May ’24