We're developing a service that requires webtransport support in the browser. Currently, the only browser that doesn't provide support is the IOS version of Safari.
Our current way forward for client use is to flag iphone and ipad as non compliant and recommend either desktop use or android.
Is there any ballpark date as to when WebTransport will be included in IOS Safari (- webkit supports webtransport)?
Safari
RSS for tagSafari 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
After updating Xcode to the latest version we observed that SFSafariViewController is not loading web pages on Xcode 16 Simulator with iOS 18, whenever it is presented the View Controller is empty (does not load any content) and the app freezes, but other screens that use WKWebView are working normally.
Also, during tests on physical devices with iOS 18 it seems to work just fine, so it might be just a IDE version problem.
Is anyone experiencing the same issue?
If so, did anyone find a solution for it?
Hi, I am having issue with WebAssembly not able to load wasm file on Safari web extension.
It is showing CompileError: Refused to create a WebAssembly object because 'unsafe-eval' or 'wasm-unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'".
It was working fine 2 month ago, my original CPS is "script-src 'self' 'unsafe-eval'". But now it is not accepting 'unsafe-eval', I also tried 'wasm-unsafe-eval' did not work.
Is there any changes on Safari browser regarding the CSP for WebAssenbly? Please let me know what CPS value will work.
Here is the example code on how I load the WebAssembly wasm file.
fetch('test_wasm_lib.wasm')
.then(response => {
if (!response.ok) throw new Error('Network response was not ok');
return response.arrayBuffer();
})
.then(bytes => WebAssembly.instantiate(bytes))
.then(results => {
// Use your WebAssembly instance here
console.log('load wasm success')
})
.catch(error => {
console.error('Error loading WASM:', error);
});
Hello,
I am facing a strange issue on iOS 18. After upgrading to iOS 18, I noticed the following problem:
When connected to mobile data (with Wi-Fi turned off) and trying to upload a file larger than 1MB, the connection times out. However, if I repeat the same action using Wi-Fi, everything works fine.
I have tested this issue in various ways, but nothing seems to resolve it. It appears that iOS 18 might have introduced a bug.
You can replicate the issue using this site: https://video.online-convert.com/convert-to-mp4 (Note: this is not my page, but I found the same issue here).
From the server access logs, I see successful pre-flight requests, but the main POST request never follows, which suggests that the client is not sending the request.
It seems Safari 18's fetch() does not include credentials even credentials: include and safari extension has host_permissions for that domain.
Is there anyone has this problem?
I try to request in popup.js like this:
const response = await fetch(
url,
{
method: 'GET',
mode: 'cors',
credentials: 'include',
referrerPolicy: 'no-referrer',
}
);
and it does not include the cookie from host_permissions.
Those code worked in Safari 17 (macOS Sonoma).
Is it possible to enable/disable the enabled flag before the extension is loaded? we want to have a button in our app which controls the availability of the content blocker ruleSet in declarative_net_request in manifest (version 2).
"declarative_net_request": {
"rule_resources": [
{
"id": "ruleset_1",
"enabled": true,
"path": "ruleset_1.json"
}
]
},
The following icon has been introduced in Safari's address bar for iOS 18:
I’d like to use it in my app to guide users on how to enable my Safari extension, but I couldn’t find it in SF Symbols beta 6.0 (99).
Is this because it’s still in beta and will be available for third-party use later, or is it a private icon that only Apple can use? I hope I just overlooked something.
Safari cannot open the page due to the error 'WebKit encountered an internal error.' We are using https://github.com/stleamist/BetterSafariView.git, and it was working fine before we updated to Xcode 16.
We are using manifest version 2, and currently some dynamic ads which come under the #document (documentURL) are not getting fetched and we are not able to block.
is there an alternative for onBeginRequest in iOS Safari? How can we fetch the dynamic URLs otherwise?
We have observed that blocking content using Safari web extension does not fetch few URLS within the #document (documentURLs) because the onBeforeRequest webextension API is currently not available in Safari iOS.
But it works fine using the Content blocking extension.
We have a list of URLs which we want to block from the website. Which extension would you suggest the Content blocking extension or the Safari web extension?
Hi everyone,
I’m working on an iOS app using WKWebView, and I have a specific use case involving cross-origin iframes and form autofill. I’m wondering if it’s possible to programmatically fill input elements, such as credit card numbers, within a cross-origin iframe loaded in a WKWebView.
I understand that due to the Same-Origin Policy, direct DOM manipulation of cross-origin iframes is restricted. However, I’m curious if there are any methods or workarounds that might allow me to achieve this, specifically within the context of WKWebView. Thanks.
I’ve noticed that redirecting from one web page to another using DNR (Declarative Net Request) no longer works if:
The source page is a search results page of the default search engine, and
The user searches for a keyword from Safari’s address bar.
Has this functionality been degraded, or is it an intentional restriction?
I'd like a response from Apple.
Steps to Reproduce
Create a Safari extension that adds the following rule using browser.declarativeNetRequest.updateSessionRules() in background.js:
{
id: 37457985,
priority: 1,
action: {
type: "redirect",
redirect: {
regexSubstitution: "https://search.brave.com/search?q=\\1"
},
},
condition: {
regexFilter: "https://duckduckgo.com/\\?(?:.*&)?q=([^&]*).*",
resourceTypes: ["main_frame"]
}
}
Enable the extension in Safari.
Set Safari’s default search engine to DuckDuckGo.
Type "hello" in the address bar to search for it.
Expected:
Search results for "hello" appear in Brave Search.
Actual:
Safari navigates to neither DuckDuckGo nor Brave Search.
For further reference, please see:
Sample Xcode project: GitHub link
Demo video: GitHub link
Environment
I’ve confirmed this issue on the following environments:
Safari Technology Preview 202 (macOS Sonoma 14.6.1 (23G93))
iOS 18 RC (22A3354)
This issue does not occur in the latest release version of Safari 17.6 (19618.3.11.11.5) on macOS, so I believe it started with the current development version of Safari.
Context
My Safari extension, Redirect Web for Safari, uses DNR to redirect one web page to another. While the extension is not specifically designed to change the default search engine, some users use it to set their preferred search engine. Unfortunately, this issue will break their use case.
Additional Information
This issue only occurs when searching from the address bar. It does not happen when searching directly from https://duckduckgo.com.
I haven’t submitted this issue via Feedback Assistant because I’m unsure if it’s a bug or intentional behavior. I’d like to confirm if this is by design first.
Hello!
We have been testing the upcoming Safari 18 on macOS 15 Sequoia betas and noticed one inconsistent detail about Safari Web Extensions support compared to other browser which implement Web Extensions (Chrome, Edge, Firefox).
Background
We have a Safari Web extension which is monitoring navigation events using browser.tabs.onUpdated API.
navigation event subscription code sample
browser.tabs.onUpdated.addListener((tabId, changeInfo, details) => {
onTabUpdated(tabId, changeInfo, details)
});
navigation event handling code sample
onTabUpdated(tabId, changeInfo, details) {
console.log(`onTabUpdated: ${tabId}`, changeInfo, details);
// check URL in the tab for safety
}
});
If the extension detects that the user navigates to an unsafe URL, it redirects the user to a page hosted by the extension. It's an HTML resource from the extension bundle. The extension is using browser.tabs.update API to redirect a specific tab to an internal page.
const internalPage = browser.runtime.getURL("popup.html");
browser.tabs.update(tabId, { url: internalPage });
Discovered problem
When we use browser.tabs.update API
browser.tabs.update(tabId, { url: internalPage });
to redirect the user from an unsafe page, we notice that the redirected tab changes its identifier.
We know that is the case because we see another API firing. It's called browser.tabs.onReplaced. We have a similar subscription for those events.
When the page is redirected, the onTabReplaced handler is firing and informs us about the tab ID change after the redirect.
onTabReplaced(addedTabId, removedTabId) {
console.log(`onTabReplaced: ${removedTabId} -> ${addedTabId}`);
}
This is problematic for us in several ways:
The extension keeps track of the tab ID so that when the embedded HTML page is loaded, it can still tell the user about the original URL that was blocked. The behavior observed in Safari 18 breaks current expectations of our code and breaks the functionality of our extension.
This behavior is specific to Safari 18. Safari 17 does not behave this way which means that we will need to deploy an update to our Safari extension to mitigate that bug on the upcoming Safari version.
Moreover, this behavior is not observed in other browsers which implement Web Extensions standard (Chrome, Edge, Firefox). All these browsers preserve the tab ID after redirect. That is a problem for us as we run the same code in all 4 browsers that we support. This will cause increase of code complexity to cover Safari as an exception out of common rule.
Environment
Safari version 18.0 (20619.1.26.31.6) and all prior Safari 18 betas.
issue does not happen on Safari 17.
macOS 15 beta 8 (24A5331b) and all prior macOS 15 betas.
issue has been successfully reproduced on macOS 14 with Safari 18 betas which points to the fact that the issue is not exclusive to macOS 15. Safari 18 brings the faulty logic.
The issue has been confirmed and reproduced in a sample Xcode prowejt provided by Apple called "Sea Creator". So the issue is not specific to a single extension.
Feedback case
FB14975378. It contains sample code, the full Xcode project, screenshots and sysdiagnose.
Any advice or assistance is highly appreciated!
We have an iOS Safari extension currently distributed via Testflight.
I’ve noticed that after an indeterminate period of time (sometimes days, sometimes weeks) our safari extension will stop working. It will need to be turned on again from the system general -> safari -> extensions menu.
This is occurring on both iPhones and iPads running 17.6.1.
Is there any condition that will cause the system to disable a safari extension, requiring the user to reopen iOS settings to re-enable?
We have an iOS Safari extension currently distributed via Testflight.
I’ve noticed that after an indeterminate period of time (sometimes days, sometimes weeks) our safari extension will stop working and will need to be turned on again from the system general -> safari -> extensions menu.
This is occurring on both iPhones and iPads running 17.6.1.
Is there any condition that will cause the system to disable a safari extension, requiring the user to reopen iOS settings to re-enable?
After iOS 17.4, Passkey Autofill stopped working inside ASWebAuthenticationSession.
iOS 17.5 re-enabled users to pick passkeys if they tap "🔑" icon on right bottom of keyboard and opened Safari password manager.
However, it still doesn't recommend passkeys on the first view.
Even on the latest iOS 18.0 developer beta, the behaviour is not fixed yet.
Check the attached screenshot, web inspector shows the right element size and position, but Safari renders it in a wrong place. The element reacts on mouse events also correctly - according to its real position.
Here you can find the live example https://3dflipbook.net/css-layer-highlight
This is a regression issue, it was working fine in 15.6.
Bug tracker: https://bugs.webkit.org/show_bug.cgi?id=278898
Please fix the issue.
Hey, Im trying to utilize the new DDM features introduce in Safari 18 & macOS 15 and enabling extension using my MDM (Intune in my case).
For some reason, it doesn't seems to work on my mac machine running macOS 15 beta.
Intune support claims that everything is configured as it should on their end, and there is a problem with device or configuration.
I used Apple documentation and the configuration YAML in apple device management repo So I don't really sure what I am missing.
Has someone managed to make it work using MDM (intune, jamf, etc')? And if so can he shared the configuration?
Thanks.
Hello,
I am developing a Mac application via Mac Catalyst and encountering an issue with WKWebView. Specifically, I'm loading a webpage (e.g., https://translate.google.com) in WKWebView, but when I press the copy button on the page, the content doesn't actually copy to the clipboard.
I've attempted modifying the UserAgent without any success. Here is the relevant part of my code:
override func viewDidLoad() {
super.viewDidLoad()
let config = WKWebViewConfiguration()
config.preferences = WKPreferences()
config.defaultWebpagePreferences.preferredContentMode = .desktop
let webView = WKWebView(frame: .zero, configuration: config)
webView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(webView)
webView.scrollView.showsVerticalScrollIndicator = false
webView.backgroundColor = UIColor.white
webView.scrollView.backgroundColor = UIColor.white
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
if let url = URL(string: "https://translate.google.com") {
let req = URLRequest(url: url)
webView.load(req)
}
}
Hello, a very simple question, is there a test domain that is flagged by safari as a fraudulent webpage? one that is just for testing? Thank you.