We're using the PaymentRequestAPI, and to my surprise I see that if we open the payment dialog then don't interact with it - biometrics to approve or cancel/X button - it sits there open indefinitely.
Is there any way to tell it to only sit there for some limited time period before canceling?
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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm working on a school project to build a webpage for Vision Pro users. I'm using Xcode to build this webpage because it has .reality files. This webpage only works on Safari because I took a spatial image with my Vision Pro, and it's .heic file type.
I put the .png version below the .heic file that is supposed to have the spatial effect. I deployed this project on Vercel, please use Safari to check out the link: https://spatial-design-project.vercel.app
There's another issue in this project, I downloaded the Cosmonaut .reality file on Apple Quick Look Gallery to test on my webpage. However, when I open it on Vision Pro, the file won't load, it says "Failed to load layers". Does it have something to do with the server for serving this file type? Should I use an actual web hosting company for this website?
Here is my GitHub repo
<div class="hero">
<div class="hero-text">
<h1>La Sal Peak</h1>
<p>The Do-It-All Enduro Bike</p>
</div>
</div>
<div class="hero2">
<div class="hero-text">
<h1>La Sal Peak</h1>
<p>The Do-It-All Enduro Bike</p>
</div>
</div>
.hero {
position: relative;
display: flex;
align-items: flex-end;
justify-content: flex-start;
height: 100vh;
background: url("assets/heroImage.heic") no-repeat center center/cover;
color: white;
}
.hero2 {
position: relative;
display: flex;
align-items: flex-end;
justify-content: flex-start;
height: 100vh;
background: url("assets/hero.png") no-repeat center center/cover;
color: white;
}
I've observed a discrepancy in cookie consent options between iOS 18.0 and 18.1 on some websites, such as www2.hm.com. On iOS 18.0, I see "Accept All Cookies" and "Only Required Cookies" options, whereas on iOS 18.1, the options change to "Accept All Cookies" and "Cookie Settings."
I would like to understand if this behavior is related to differences in how websites detect the operating system version (iOS 18.0 vs. 18.1) or browser changes within the iOS update. Has anyone else experienced similar variations in cookie consent banners, and could this be tied to differences in the user agent or website A/B testing for different OS versions?
Any insights or technical clarifications would be appreciated!
Hey,
when I try to run my project on an iOS Simulator, I get the following message:
JournalingSuggestions is not available when building for iOS Simulator.
and
Linker command failed with exit code 1 (use -v to see invocation)
Steps to reproduce this behavior:
Create a new Xcode project
Add the Journaling Suggestions Capability
Add the Journaling Suggestions Framework
Under "Target > Build Phases > Link Binary with Libraries", select “optional“ for JournalingSuggestions.framework
Under "Target > Build Settings > Other Linker Flags > Debug" select „Plus“ and add „iOS or iOS Simulator“ and paste this -Xlinker -weak_framework -Xlinker JournalingSuggestions into the editable field.
Do the same for "Target > Build Settings > Other Linker Flags > Release"
This tread is about the same problem, but is already checked as answered.
That's why I'm creating this new tread.
The last two bullet points are results from advice from the other thread.
MacBook Air, M1, 2020, macOS: 14.6.1, Xcode: 16.0
Thanks for your help!
Got the wrong keywords, trying to create a new thread...
Topic:
Safari & Web
SubTopic:
General
Hello, following problems described here:
https://developer.apple.com/forums/thread/765272
Last version of Safari apparently corrected previous bugs, however we encountered another problem. Right now Safari uses autocomplete feature of some kind (Siri suggested websites/Top hit) which triggers blocking while writing the name of the website. Probably somehow loads website in the background. Problem is, that this behavior is impossible to debug, because this autocomplete doesn't work, while the browser console is open. We are using content script for blocking.
Please advise.
Thanks very much
Topic:
Safari & Web
SubTopic:
General
On my M3 MacBook Pro 14'' laptop, when using Safari responsive design mode I cannot see any simulators when choosing "Open With Simulator". I am on the latest Sequoia 15.1 and Xcode version is 16.1. However when I successfully run a simulator from Xcode (Developer Tools -> Simulator) I can see the simulator running in the "Open With Simulator" dropdown but I cannot click it to run it with my safari desktop. I can never link my desktop safari app to a simulator. I feel I have read almost every how to blog but have no more options left to get this working.
I've tried reinstalling Xcode and the iOS 18.1 environment on it, updating safari and anything else that might be out of date but still with no luck after much restarting programs and my machine. Is there another way to try and run a simulator from Safari?
I'm tasked with securing a Safari browser extension that my organization created. It is using WebExtensions and has been launched across various browser extension stores, including Safari. I've searched for many hours on this and find very very little information on how to secure it. (Pretty much just https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy.) Is there anything more extensive/comprehensive? I'll be dealing with Safari Desktop as well as Safari iOS.
By comparison, when looking for resources for securing the Firefox version of the extension, I found https://extensionworkshop.com/documentation/develop/build-a-secure-extension/, which I think is a great resource. Some of that content applies to Safari, but it's hard to know to what extent. I'll need to secure Safari web and Safari mobile (i.e. iOS), but for now I'm focused on web. (But if you have anything on mobile, then please let me know also.)
Thank you!
Hi, i embedded vimeo video on the website and alreay make it allowfullscreen. However, when i open chrome/firefox on Ipad, the vidoe not showing fullscreen. Also on iPhone, when exit the fullscreen video. It doesnt hide the iframe element. Initially, i hide the iframe and implement button so that when user click on it, the video will display full screen
Hi everyone,
We're facing a challenge with Apple's WKWebView and its WKAppBoundDomains limit.
Our web app is hosted across multiple dedicated domains to ensure security and isolation for our customers. Additionally, we rely on a service worker to provide offline functionality within our app. To enable the service worker in our WebView app, we must specify the domains within the app-bound domains list.
The issue we're encountering is the 10-domain limit, which is restrictive since our app needs to support access to more than 10 domains.
Has anyone found a workaround for this limitation? Or does Apple provide any exceptions to this rule if a strong case is presented?
We’d greatly appreciate any insights or experiences you can share. Thanks in advance!
Topic:
Safari & Web
SubTopic:
General
Hi there, we have found a problem, after switching audio tracks multi times when play the HLS, there will be a few seconds of no sound playing after audio track switching, Is there a solution to this problem?
When a tab goes to sleep, all its resources gets killed. When the user has any interaction it gets active again. However, if there is an audio in the tab, it does not play again even after user interaction. One has to reload/reopen the tab.
Is this how it should work?
Is there a fix for this?
私たちはJavaアプリケーション開発者で、iPadOS上でのWebRTCによるカメラアクセスに関して、iPadOS 17.1での挙動について質問がございます。
具体的には、iPadOS 17.1でChromeブラウザを利用し、WKWebView API経由でカメラにアクセスしようとした際、エラーが発生し、カメラ撮影が実行できない現象が発生しております。弊社の調査では、WKWebView APIのnavigator.mediaDevicesプロパティを通じたデバイスアクセスが、Chromeで動作しない可能性が示唆されました。しかし、Safariブラウザでは正常に動作するため、Chromeに固有の制限があるのか、またはiPadOSの設定や仕様に起因するのか判断しかねております。
現在、iPadOS 17.1でのカメラアクセスに関するWKWebViewとWebRTCの仕様やChromeでの制約について、ご見解や解決策についてご教示いただけますと幸いです。
どうぞよろしくお願いいたします。
Topic:
Safari & Web
SubTopic:
General
On iOS (iPhone or iPad) the following behaviour happens:
when both an HTML video element and an HTML audio element are playing on a page,
and the video source ends,
and the video source is programmatically forced to play again
then the system will automatically pause the audio.
See following stackblitz project for a sample:
https://stackblitz.com/edit/ios-audio-paused-on-video-playing?file=README.md
Steps to reproduce
Feel free to try with both another audio and video source, here limited by the available space in Stackblitz plan.
On an iPhone/iPad device or simulator, in Safari:
browse to index.html
when on iPhone, press iPhone Load to force preloading video. Not needed on iPad
press Play to start playing both audio and video
wait until clip ends and then restarts from 0:00
Expected
Audio should keep on playing and eventually loop.
Actual
When clip restarts from 0, audio is put to pause by the system.
Further details
This does not happen e.g. on Mac Safari nor on another device/browser.
Also, some alternative scenarios:
when HTML video element has the muted attribute, the issue disappears and audio is not paused
when HTML audio element is replace with Web Audio API, the issue disappears and audio is not paused
Hello I am having issues where when I open a link to YouTube in a wkwebview it opens up the installed YouTube app. I have tried my own way of blocking the opening of the YouTube app but it seems I'm stuck.
Is there a way to prevent certain apps from opening automatically from links clicked on or traveled to?
Here is what I have so far.
guard let url = navigationAction.request.url else {
decisionHandler(.cancel)
return
}
//not sure why this code is not being used...
// Check if the navigation is a link click with target="_blank"
if navigationAction.targetFrame == nil {
// Handle the navigation request to open a new window
if let url = navigationAction.request.url {
// UIApplication.shared.open(url) //opens in safari....
let request = URLRequest(url: url)
webView.load(request)
decisionHandler(.cancel)
return
}
}
// Continue with the navigation if not a link with target="_blank"
if url.scheme == "youtube" || url.scheme == "music" {
decisionHandler(.cancel)
return
}
//this should cancel app opening for youtube:// links and apple music.
// if let url = navigationAction.request.url {
// // Allow Google sign-in redirects
// if url.absoluteString.contains("accounts.google.com") || url.absoluteString.contains("gstatic.com") {
// decisionHandler(.allow)
// return
// }
// }
if url.absoluteString.hasPrefix("http") {
decisionHandler(.allow)
return
}
if let url = navigationAction.request.url {
if shouldDownloadFile(from:url) {
// if navigationAction.navigationType == .other, let mimeType = navigationAction.request.allHTTPHeaderFields?["Content-Type"], mimeType.contains("application/pdf") {
downloadFile (from: url)
decisionHandler(.cancel)
return
}
}
decisionHandler(.allow)
}
Topic:
Safari & Web
SubTopic:
General
I have a web extension that I want to send data to, and receive a response containing modified data.
My understanding is that the native app is only contactable by a background script. How does a webpage contact the background script?
One answer is by adding a content script, which is able to communicate with the background script using browser.native.sendMessage(). Unfortunately this triggers a warning that "this extension can read and alter web pages".
I do not want to read and alter web pages, nor do I want users to be concerned about a permission the app doesn't need. I just want to receive data, and then return a response.
What API should I be using to achieve this?
Hello,
I have a website that uses OTP's via text messages, and it was working where when the text came through and iPhone Safari would offer to paste the OTP into the web form, but it doesn't work now. I'm wondering what I can to do to get this working again.
Thank you, -Michael
Topic:
Safari & Web
SubTopic:
General
Hello. In Safari there are no eorking nee skins or walpapers!
Topic:
Safari & Web
SubTopic:
General
Hello everyone,
I’m working on adding a Safari extension as an application extension to an iOS app created using Capacitor (generated from a React app). My goal is to bundle the Safari extension within the Capacitor app, allowing it to serve as a companion app for the extension. However, I’ve run into issues where the extension does not show up in Safari's extension settings when I run the app on a device or simulator.
Here's an overview of what I’ve done so far:
I initially used Capacitor’s command line tools to generate the iOS app from my React project. This app runs fine on its own.
To add the Safari extension, I’m not developing a platform-specific extension from scratch; instead, I used the Xcode command line to convert a Chrome extension to a Safari iOS extension. The converted extension functions correctly if paired with the default Swift app that comes with the conversion.
Right now, I effectively have two products:
The base Capacitor app (without the extension), which I want as my main app.
The standalone Safari extension bundled with the Swift app (from the conversion process).
My question is: How can I merge these two products so that the Capacitor app becomes the companion app for the Safari extension, allowing the extension to show up in Safari's settings? Are there specific configurations I should adjust in Xcode or within the manifest files to make this work seamlessly?
Any guidance or best practices from others who have integrated Safari extensions into non-Xcode-based projects would be much appreciated!
Thank you!
The web page image is not fully displayed, only part of it is rendered. Switch the app to the background and then to the foreground, and the incomplete image will be rendered correctly again.
Topic:
Safari & Web
SubTopic:
General
Description:
When using a multilingual keyboard that includes Korean in iOS 18, the input element's onChange event is triggered multiple times instead of just once. This issue occurs not only when entering numbers with input type="tel" or inputMode="numeric", but also when entering text with input type="text". This causes unexpected behavior in forms and other input-related functionalities.
Affected Devices and OS Version:
Device: iPhone 16 Pro
OS Version: iOS 18.0
You can reproduce the issue with this CodeSandbox example:
https://codesandbox.io/p/sandbox/elegant-dream-jnqh39
Steps to reproduce:
Use a multilingual keyboard (e.g., Korean and English) on iOS 18.
Type some text into the input field (input type="text").
Also try entering numbers using input type="tel" or inputMode="numeric".
Observe that the onChange event is fired multiple times for both text and numeric input.
Expected behavior:
The onChange event should only be triggered once when text or numeric input changes.
Additional Information:
This issue has been reported under feedback ID FB15377631. Currently waiting for a response from Apple regarding this feedback.