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

Safari Web Extension Not Automatically Enabled After Download
Hey, I'm working on a macOS application that includes a Safari Web Extension plugin (.appex). Both the main application and the extension are properly signed and notarized. After downloading and installing my app, the Safari extension becomes only usable if the user enables the "Allow unsigned extensions" option in Safari's settings, suggesting that the extension is perceived as unsigned despite being correctly signed and notarized. Here are the details of my configuration: Both the main app and the extension use the same signing certificate. The Bundle Identifiers are correctly configured and unique. The developer team is the same for both. App Groups are defined and identical for both. "Automatically manage signing" is enabled. Version and build numbers are identical in the identity settings. Minimum Deployment Target is set to macOS 12. In the extension's Info.plist, NSExtensionPointIdentifier is set to com.apple.Safari.web-extension and NSExtensionPrincipalClass is set to $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler. I've tested this behavior across different macOS versions and computers, but the issue persists. Has anyone experienced something similar, or does anyone have an idea what might be causing this?
1
0
341
Feb ’24
Having issues clearing cookies in Safari via NextJS
I have a web application built in NextJS that I use cookies to handle persisting authentication details. I clear the cookies on logout and this works in other browsers. However, when I run this on Safari, it seems the browser is caching the cookie information. When I use the Safari debugger, I do not see the cookies in the Storage view, however, when I use document.cookies, I can retrieve them fine - which should not happen. This is not the case in Chrome. I can't find any information on this online, so any help or insights would be greatly appreciated.
0
0
443
Feb ’24
[bug report] Unicode characters with "variation selectors" are not rendered in the iPhone Safari browser (webkit) with iOS 17.3
Environment: iPhone 14/15, iOS 17.3 Description: Unicode characters with "Variation Selectors Supplement" code can be rendered correctly in all iPhone before iOS 17.3 . But in iOS 17.3, these characters become "blank" in iPhone. Fonts with Variation Selectors are used for displaying alternative Chinese characters reprensenting different pronoucation and different stroke styles. Screen capture from an issue case in iOS 17.3 (bad): Screen capture from a good case in other OS (good): Reproduce steps: Download a "Variation Selectors" supported TTF font https://github.com/ButTaiwan/bpmfvs/releases/download/v1.400/BpmfZihiKaiStd.zip Unzip the ttf font file "BpmfZihiKaiStd-Regular.ttf" from the zip to a folder In the same folder, create an file "index.html" with the following content: <head> <meta charset="utf-8"> <style> @font-face { font-family: zihaibpmf; src: url('BpmfZihiKaiStd-Regular.ttf'); } </style> </head> <body> <table class="redboder" border> <tr><td> Unicode Text </td><td style="font-family:zihaibpmf;">一</td><td style="font-family:zihaibpmf;">一󠇡</td><td style="font-family:zihaibpmf;">一󠇢 </td></tr><tr><td> Unicode Hex Code</td><td> 0x4E00</td><td>0x4E00 0xE01E1</td><td>0x4E00 0xE01E2 </td></tr> </table> </body> Upload the files to a web server Browser the "index.html" with an iOS 17.3 iPhone 14 or 15 There should be a character displayed in each table cells. But with iOS 17.3, two of the cells are blank. Reference: opensource IVS TTF font github: "BpmfZihiKaiStd" TTF Font file download : https://github.com/ButTaiwan/bpmfvs/releases/download/v1.400/BpmfZihiKaiStd.zip "Variation Selectors Supplement" is supported by all other OS (Windows, Android, Linux, old iOS, macOS), see : wiki : Variation Selectors Supplement https://en.wikipedia.org/wiki/Variation_Selectors_Supplement wiki : Variant form (Unicode) https://en.wikipedia.org/wiki/Variant_form_(Unicode) ...Variation Selectors Supplement is a Unicode block containing additional variation selectors beyond those found in the Variation Selectors block. These combining characters are named variation selector-17 (for U+E0100) through to variation selector-256 (U+E01EF), abbreviated VS17 – VS256.
4
1
688
Feb ’24
WebXR Microphone Input Issue
Hello, I'm developing a WebXR application in Safari on visionOS. This app uses the microphone input in WebXR. I've noticed that with the microphone permission allowed the audio input doesn't capture. The size of the blob is always 0. I made a small demo here: https://github.com/chrisdubya/avp-threejs-webxr-test I've tried this demo on other WebXR supported HMDs and the audio capture works fine.
0
0
434
Feb ’24
Safari and Safari Technology Preview completely broken after upgrading from Ventura 13.6.5 to Sonoma‌ 14.4
Hi, three days ago I made the mistake of upgrading to Sonoma 14.4. After the upgrade, I tried to open Safari, and was met with a popup window/prompt asking whether I want to open the window/tabs from the previous session. Regardless of whichever option I chose, Safari just froze completely. I tried force quitting, and starting Safari whilst holding the Shift key (which should open a fresh session), but that also didn't work. Following that, I tried starting Safari in Safe Mode, but that also did not work. I should note that at this time Safari Technology Preview was working fine. After half a day of trying to troubleshoot this, an Apple Mail extension (Mailbutler) prompted me to sign in to my Google account, and that process triggered a small window/session of Safari to open (with the Gmail login page). Finally, I was able to access the Safari menubar settings. I went into the menubar settings, deactivated all 20 or so of my extensions, deleted all website data, deleted cache for both of my two profiles, quit Safari, and then tried to open Safari hoping all of that would have fixed it. This time, Safari just froze immediatly without giving me to option of restoring the previous session or not. I tried accessing the Safari menubar settings several times using the Apple Mail/Mailbutler/Gmail login loophole, and after some trial and error I discovered that I was able to open a window with my secondary profile ("Work"), without any problem. I also tried to open a window with my default profile ("Personal"), multiple times - but this always caused Safari to freeze/become unresponsive. At this point, I assumed that the default profile must have been "corrupt" in some way (I have no idea how that could even happen though). I've called Apple Support, and Apple Developer Support, 3-4 times in the last couple of days trying to get help, but as soon as they hear that I am on Sonoma Beta, they just give up and say that they have no obligation to assist customers with beta versions (despite having AppleCare), and the only recommendation they can give is to format the computer and do a complete Time Machine backup restore.. After having spoken to Apple Support, I've tried to reinstall Sonoma three time. I have tried to selectively, and completely, delete the Safari library files (and then restoring backups when noticing that it hasn't worked). I have also tried to use Cookie (by SweetP Productions) to delete various Safari files, hoping that might fix the issue. Finally, I've tried to delete all of the Safari library files (with backups), and then using Time Machine I've attempted to restore all the files that were used by Safari prior to the Sonoma upgrade (this also didn't work). Earlier today I decided to simply give up, and just forget about Safari. After all, Safari Technology Preview was working fine, and I could just use that until Apple pushes a new Sonoma update (which would hopefully repair Safari). But after half a day of using Safari Technology Preview, I now seem to have run into the exact same problem. Right now, both Safari and Safari Technology Preview are completely broken. Both programs become unresponsive the moment they are launched. As Apple provides the dmg file for Safari Technology Preview on their website, I figured I should at least be able to simply reinstall the app and that would solve the problem. But reinstalling Safari Technology Preview doesn't seem to do anything at all. Long story short - I have somehow managed to break both Safari and Safari Technology Preview after upgrading from Ventura 13.6.5 to Sonoma‌ 14.4. Apple are telling me they won't provide any help as I am using beta software. If anyone has any suggestions or ideas for how to solve this (for example, deleting any of the library/support files?), please don't hesitate to share. Thanks
0
1
366
Feb ’24
SFSafariViewController Download UX - Divergent Behavior
I've been conducting tests on various iOS apps to identify those that disrupt website downloads when using in-app browsers. During my testing of Gmail, I observed that clicking on Safari within the app actually leads to what seems to be SFSafariViewController. However, the downloading experience within this view is notably cumbersome. To save an image, users must first select 'More...' then scroll to find and select 'Save image'. This behavior is unexpected when users anticipate accessing the full Safari browser. What are the reasons behind the differing UI/UX of SFSafariViewController and Safari?
0
0
259
Feb ’24
WKWebView: SVG with 100% height and width is rendered truncated
If you render an SVG in the WKWebView component that has an <image> tag, xlink:href attribute and 100% height and width, the lower part of the SVG is always cut off. My expectation would have been that the SVG would be rendered entirety. This happens on all devices I have tested it on and in the simulator. It also happens regardless of the SVG file. It does not happen on Android devices or in other browsers. Minimal code example to reproduce: import UIKit import WebKit class ViewController: UIViewController, WKUIDelegate { override func viewDidLoad() { super.viewDidLoad() let webView: WebViewController = WebViewController() webView.loadView() view.addSubview(webView.webView) webView.setAnchors(view: self.view) } } class WebViewController: UIViewController, WKUIDelegate { var webView: WKWebView! func setAnchors(view: UIView) { webView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true webView.heightAnchor.constraint(equalToConstant: 160).isActive = true webView.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 1.0).isActive = true } override func loadView() { let webConfiguration = WKWebViewConfiguration() webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.uiDelegate = self webView.translatesAutoresizingMaskIntoConstraints = false view = webView webView.loadHTMLString(""" <svg width="100%" height="100%"> <image xlink:href="https://upload.wikimedia.org/wikipedia/en/5/56/Batman_Logo.svg" width="100%" height="100%"/> </svg> '''; """, baseURL: nil); } } Xcode version: 15.2 (15C500b) Bug reporting feedback reference id: FB13589238
1
0
463
Feb ’24
Website Video Element Volume cannot be controlled on non default audio devices
Dear Apple: I have a Website with a HTML Video Element. It is a Videochat. I want to change the speaker device but this currently does not work. I've fixed it locally via .setSinkId(sinkId) already (can be simulated via audioff addon) but ran into a major problem on macOS. The user that changes the desired speaker cannot change the volume via volume keys on macOS. Problem: So I can fully mute my macbook and the website keeps screaming at me! Reason: Just the default device gets muted which is not necessarily what the user selected as Output device for the html video/audio element via .setSinkId(sinkId). Steps to reproduce: Use Firefox (Safari doesn't even support HTMLMediaElement API: setSinkId) Install and activate the addon audioff (you can setSinkId on a different audio output device per website, similar to how I would fix the bug) You need a element that plays sound. I use a hallosophia.com account and created a meeting link and join twice. You can use this Link where anyone can join: https://www.hallosophia.com/waiting-room/724c6fb2-7261-4133-a3e6-66dfd4a0263f/inkognito - speaker doesn't apply so set it to MacBook but will not apply and still be in your AirPod. Have one AirPod in the ear and go to the website with the sound playing element and right click on the page to "Audio output select" via audioff (which you could also do as the website itself via .setSinkId(sinkId)) and change the speaker from AirPod to MacBook. -> As expected you will have the sound on your MacBook speakers but you cannot change the volume via Volume keys. Even if your MacBook is muted the website can "scream at you" I can verify that macOS has the default behaviour of changing just the default speaker volume by installing the non verified app MultiSoundChanger. With this app installed everything works as expected and it changes all audio devices volume at the same time. But it is not even a verified app. So I would say what needs to change is the default behaviour in macOS that it changes the volume of all speakers and not just the default speaker. And that Safari starts to support .setSinkId(sinkId). I use a MacBook Air 2020 on Sonoma 14.2.1 with Firefox 122.0
0
0
257
Feb ’24
Strange counting in Safari
First: don’t tell me about webkit-reporting. I just get a 502 from there! Ok, what’s the problem? I made an example telling it all: <html> <head> <style> .ext { display: none; color: cyan; } body { max-inline-size: calc(100vi - 12px); &:not(:has(:target)), &:has(p.dft:target) { #ext { display: none; } #dft { display: block; } } &:has(p.ext:target) { #ext { display: block; } #dft { display: none; } } &.ext li { display: none; } &:has(.ext:target) { & li.ext { display: revert; } } } header > p > a::before { color: orange; content: "click me >>> "; } ul { display: flex; } li { margin: 1ex; list-style-type: none; inline-size: max-content; } .yes li::before { font-size: 70%; color: yellow; background-color: blue; content: "(" counters(total, ":") ")"; } ul.nGrp { display: inline flex; counter-reset: nameIndex; & li::after { display: inline-block; counter-increment: nameIndex; font-size: 75%; color: red; vertical-align: sub; content: "(" counter(nameIndex) ")"; } } header { inline-size: 100%; font-size: 2rem; text-align: center; } article { counter-reset: total; padding: 1ex; margin: 1em; &::after { font-size: 3em; color: purple; content: "— [" counter(total) "] —"; } li { counter-increment: total; } outline: 1ex groove purple; } </style> <title>Strange Safari-Count</title> </head> <body lang="de"> <header> <hgroup><h1>Strange counting without <code>:before</code></h1><p>different from FireFox!</p></hgroup> <p id="dft" class="dft"><a href="#ext">More?</a></p> <p id="ext" class="ext"><a href="#dft">Less!</a></p> <p><code>:before</code> doesn’t inherit parent’s display:none? (same in FireFox)</p> </header> <article> <ul> <li class="dft"><p>A1</p></li> <li><ul class="nGrp"><li class="dft"><p>A1</p></li><li class="dft"><p>A1</p></li></ul></li> <li class="dft"><p>A3</p></li><li class="dft"><p>A4</p></li> <li><ul class="nGrp"><li class="dft"><p>A5</p></li><li class="ext"><p>A5</p></li></ul> </li> <li><ul class="nGrp"><li class="dft"><p>A6</p></li><li class="dft"><p>A6</p></li><li class="dft"><p>A6</p></li></ul></li> </ul> <ul> <li><ul class="nGrp"><li class="ext"><p>B1</p></li><li class="dft"><p>B1</p></li></ul></li> <li class="dft"><p>B2</p></li> <li><ul class="nGrp"><li class="dft"><p>B3</p></li><li class="ext"><p>B3</p></li></ul></li> </ul> </article> <article class="yes"> <ul> <li class="dft"><p>A1</p></li> <li><ul class="nGrp"><li class="dft"><p>A1</p></li><li class="dft"><p>A1</p></li></ul></li> <li class="dft"><p>A3</p></li><li class="dft"><p>A4</p></li> <li><ul class="nGrp"><li class="dft"><p>A5</p></li><li class="ext"><p>A5</p></li></ul> </li> <li><ul class="nGrp"><li class="dft"><p>A6</p></li><li class="dft"><p>A6</p></li><li class="dft"><p>A6</p></li></ul></li> </ul> <ul> <li><ul class="nGrp"><li class="ext"><p>B1</p></li><li class="dft"><p>B1</p></li></ul></li> <li class="dft"><p>B2</p></li> <li><ul class="nGrp"><li class="dft"><p>B3</p></li><li class="ext"><p>B3</p></li></ul></li> </ul> </article> </body> </html> At least have an eye on the total count at the end of the (identical) articles! Before and after clicking the teaser.
4
0
656
Feb ’24
Using WKWebKit and Safari on visionOS
I have implemented a custom view that shows a page in WKWebKit: import SwiftUI import WebKit struct WebView: UIViewRepresentable { let urlString: String func makeUIView(context: Context) -> WKWebView { let webView = WKWebView() webView.navigationDelegate = context.coordinator return webView } func updateUIView(_ uiView: WKWebView, context: Context) { if let url = URL(string: urlString) { let request = URLRequest(url: url) uiView.load(request) } } func makeCoordinator() -> Coordinator { Coordinator(self) } class Coordinator: NSObject, WKNavigationDelegate { var parent: WebView init(_ parent: WebView) { self.parent = parent } } } It works, but it shows a grey button in the upper left with no icon. If I click on that button, nothing happens. But I can see this error message in the Xcode logs: Trying to convert coordinates between views that are in different UIWindows, which isn't supported. Use convertPoint:fromCoordinateSpace: instead. What is this button, and how can I get rid of it? As a second question: I also tried to spawn Safari in a separate window, using this view: import SafariServices import SwiftUI struct SafariView: UIViewControllerRepresentable { let url: URL func makeUIViewController(context: Context) -> SFSafariViewController { return SFSafariViewController(url: url) } func updateUIViewController(_ uiViewController: SFSafariViewController, context: Context) { // No update logic needed for a simple web view } } This works, but Safari shows up behind the view that is including the Safari view. Instead, I would want Safari to show up in front - or even better: next to my main view (either left or right). Is there a way to do this?
2
0
673
Feb ’24
run Javascrip on Safari
Hello, I am experiencing an issue when running a script on Safari, specifically WebKit. Here is a sample HTML code: <!DOCTYPE html> <html lang="en"> <head> <script> function delayedFocus(e) { e.preventDefault(); setTimeout(function() { e.target.focus(); }, 1000); // Adjust the delay time as needed (in milliseconds) } </script> </head> <body> <ul> <li> <input type="text" id="testtext" onmousedown="delayedFocus(event)"> </li> </ul> </body> </html> The logic behind this script is to introduce a 1-second delay when the user clicks on the textbox. After 1 second, the keyboard should appear. Testing on Android mobile devices shows the expected behavior. However, on iPhones, the textbox receives focus, but the keyboard does not appear. This issue has been observed on various iOS versions, with the script working only on iOS 15. If you have any insights or solutions to address this compatibility issue, it would be greatly appreciated. Thank you.
0
0
485
Feb ’24
Application for Choice Screen | third-party web browser
Dear all, I have carefully read your press release here. This is great news. My name is Kevin Fuchs and I am co-founder of the non-profit search engine and browser app operator GOOD – good-search.org (The search engine for a better world). Today, iOS users already have the ability to set a third-party web browser — other than Safari — as their default. Reflecting the DMA’s requirements, Apple is also introducing a new choice screen that will surface when users first open Safari in iOS 17.4 or later. That screen will prompt EU users to choose a default browser from a list of options. How is it possible for us to apply for the Choice Screen program? Is there a public call for applications? Thanks for your help!
0
0
254
Jan ’24
Europa : PWA or A2HS in standalone no longer works
Hello, since the last iOS 17.4 Europe update, and since the implementation of new rules for default browsers, PWAs no longer work. In fact, they are nothing more than shortcuts for internet pages, so this makes the application unusable, which could not necessarily be launched in install mode with notifications. I tried looking for changes but couldn't find them. I think it's linked to the fact that you can install applications from the web from a marketplace. If anyone has a solution or the same problem. Thank you
22
10
6.2k
Feb ’24
Is CAN-BLOCK-RELOAD=YES required for getting low latency behaviour on Safari and AVPlayer?
I am testing HLS Low latency streams but could not to a low playback latency. For comparison purpose I used Apple HLS-LL stream(https://ll-hls-test.cdn-apple.com/llhls4/ll-hls-test-04/multi.m3u8) where I can get latency of 6 seconds on Safari and AVPlayer. The main difference between the non-working and working streams is CAN-BLOCK-RELOAD attribute. This is set as YES for Apple HLS-LL test stream where latency is observed as 6 seconds vs other stream where latency is ~= 3 full segments duration(~18 seconds). As a test I tried to change CAN-BLOCK-RELOAD=YES to CAN-BLOCK-RELOAD=NO in variant playlist response of the Apple stream using a proxy tool after which I get same result of latency ~= 3 full segments duration(~18 seconds). On AVPlayer, I see following log with CAN-BLOCK-RELOAD=YES which seems to point towards AVPlayer entering low latency mode when setting up blocking reload. mediaserverd <SEGPUMP> segPumpSetupBlockingReload: 0x1040e7600: Player entering Low Latency mode Can Apple support or someone forum members who might have experience with this please share if CAN-BLOCK-RELOAD=YES is mandatory for low latency mode to be enabled in Safari browser and AVPlayer on iOS/tvOS?
3
1
723
Feb ’24
WKWebView FCP and LCP events (Core Web Vitals)
I'm looking to gather the Core Web Vitals for the performance of the sites I open in my app using WKWebView. Specifically I'm looking for events that indicate the following: FCP: First Contentful Paint LCP: Largest Contentful Paint The idea is taken from the following article: https://web.dev/articles/vitals Does WKWebView generate those events? If so, could you please provide a reference? I was unable to find anything in my research. If it does not generate those events, could you provide some guidance on how they could be generated by maybe injecting a script or deriving those events from some existing events? I understand that this might be a complex query. So it would be great if you can provide partial answers while you look to help me with the rest of the answers and solutions. Appreciate your help with this. Vivandro.
0
1
335
Jan ’24