Having the app localised and configured to Dutch from Belgium (nl_BE), I open a url with WKWebView. The website locale detects Dutch from Netherlands (nl_NL)
Explore 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
We’re currently trying to implement Apple Pay on our checkout flow pages, which are part of a NextJS application. Due to the fact that our checkout flow is a React-based application, we’re not using the element, but a custom button. We are using the Apple Pay JS API.
It seems like we are getting most of the pieces in place, however we’re not having any success with the session.onvalidatemerchant event. Currently when a user clicks the Apple Pay button, the Apple Pay dialog appears briefly with a ‘Payment not completed.’ message and then closes immediately.
Given the nature of the issue it seems like it could possibly be a configuration error, but we’re not really sure how to check that everything is configured as it should be.
Some questions that we have at the current moment:
What version of the Apple Pay API should we be using?
Should the domainName value that we’re passing to Apple contain https:// ?
Should we be calling the https://apple-pay-gateway.apple.com/paymentservices/paymentSession endpoint directly from our front-end code?
Should we pass data to session.completeMerchantValidation(sessionData); as a JavaScript object or JSON?
Topic:
Safari & Web
SubTopic:
General
Firefox and Chrome provide various options and services to set up browser characteristics while testing. These can be used with Selenium while setting up the driver.
An example with Firefox is setting a custom user agent and a download directory different than the default. Using Python:
from selenium.webdriver.firefox.options import \
Options as FirefoxOptions
from selenium.webdriver.firefox.service import \
Service as FirefoxService
firefox_options = FirefoxOptions()
# set up user agent
user_agent = UserAgent().get_user_agent()
firefox_options.set_preference("general.useragent.override", user_agent)
# set alternate download location
firefox_options.set_preference('browser.download.folderList', 2)
firefox_options.set_preference('browser.download.dir', download_dir_path)
Many of these browser-specific options and services are listed at Selenium's website under Supported Browsers.
However, Safari's information is very limited. On Selenium's site, for example, they list how to turn on Safari's limited logging: service = webdriver.SafariService(service_args=["--diagnose"]). Then, they point us to About WebDriver for Safari - which shows automaticInspection and automaticProfiling. The page primarily describes security features for testing with Safari.
In a regular user session, one can configure an alternate download directory, set a custom profile with specific settings for that profile, and so on. And, in the Developer Menu I can set some of these items manually for a given session (user agent, for example).
How can I access these features within Safari for use in automated web testing with Selenium?
Edit: Alternatively, does Apple have, or recommend, a different automated testing package for Safari?
Dear all,
I have a web application, where it is possible to book a subscription on a monthyl / yearly basis via PayPal.
Normally the users use the safari function "add-to-homescreen" for baving the webapp directly on the homescreen.
Nevertheless, since one of the last updates, it is not possible to book a subscription via PayPal. But this is only for the homescreen variant. If i open it directly in safari everthying works as desigend.
Looking forward to get some help from you.
Thank you!
Topic:
Safari & Web
SubTopic:
General
I'm using navigator.geolocation.getCurrentPosition to retrieve the users coordinates in a PWA built with Nextjs. getCurrentPosition is called by clicking on a button. If getCurrentPosition is called afterwards, the cached value is returned. On Safari, If I refresh the page, or logout, login and call getCurrentPosition again, the getCurrentPosition error callback is called with an error code 2 - POSITION_UNAVAILABLE. After around five minutes, getCurrentPosition can be called again.
Is there some kind of throttling restriction on Safari navigator.geolocation.getCurrentPosition?
we are using angular and Html5 to develop our application, in our application we play videos that are placed on s3. Video when played on desktop borwser are adequatley audible but when played on iPad their volume is too low to be audible. I have tried
video.volume =1 but it does not work for iPad because this property is only readable for ios devices.
I have tried using javascript audioContext. It worked for my local machine. But when code is deployed on some hosted environments, it just does not work.
Did anyone face the same issue? Any help regarding it will be appreciated.
Hello everyone,
in my website I need to give users the ability to choose a color via input type=“color”.
I don't understand why it works fine on desktop (even on Safari for Mac) but doesn't open the color picker on iPhone.
How can I solve this?
Thank you,
Andrea
Upon upgrading to 18.3 safari now says no connection
cleared cookies and data. Disabled all extensions and all von and security
anyone else having this issue
Topic:
Safari & Web
SubTopic:
General
Hi,
We have a native application with a webview part.
When we open the app, we load webview resources in a false foreground. The webview communicates with the native part to query local variables, among other things. We have noticed that for the past few weeks, when the biometric component is presented to enter the fingerprint or faceId, while the component is displayed, the webview does not respond.
We do not see the calls made by the webview, nor can we respond to them. Even if you open the Safari debugger, the webview does not respond UNTIL you close the biometric component in the native part.
This has created a big problem in our app, and we wanted to know if it is an issue you had on your radar.
Thank you very much.
Styling overlap occurs between the input field style and the generated strong password field in Safari browser. Is there a way to completely override the original input field style with the styling of the filled strong password?
Topic:
Safari & Web
SubTopic:
General
Using the PaymentRequestAPI, I see this request element listed, but I can't find any description what these features could be:
sequence <ApplePayFeature> features;
https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrequestbase
https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrequestbase/4224914-features
How to handle it? regular downloads I already go working through Navigation and download delegates
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?
Is there a way to read all URLs of the currently open Safari TabGroup from a Safari Extension? In macOS and iOS
I'm encountering an issue with ReactPlayer where videos fail to play when the playback rate is set to 3x, but this problem only occurs on iOS. The same functionality works perfectly fine on Android devices and desktop browsers like Chrome and Firefox.
Here are the details of my setup:
ReactPlayer version: 2.16.0
Video format: [MP4, hls ]
Tested devices: iPhone 13
Expected behavior: Videos should play smoothly at 3x speed.
Actual behavior: Videos fail to load or play when playbackRate is set to 3.0.
I've read that iOS Safari might have limitations regarding playback rate due to performance or energy efficiency, but I couldn't find any official documentation to confirm this.
If anyone has faced a similar issue or knows the root cause (or a workaround), I'd really appreciate your insights. Additionally, if there are official resources or documentation about playback rate limitations on iOS Safari, please share them.
Thanks in advance for your help!
Topic:
Safari & Web
SubTopic:
General
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
I'm building a share extension for my app when I noticed something weird.
When I open a mobile URL (URLs with "m." like m.randomsite.org) on iOS using a browser (I'm using Safari & Chrome) and then try to share it, what will be share is the URL without the "m." (i.e. randomsite.org)
This messes up with my app since I'm not getting the real URL that I'm viewing using the browser.
I don't think it has something to do with my app since even selecting "Copy" when sharing will result in the altered URL too.
So far this is happening on both iOS 17 and 18. Does someone know whether this is a bug from iOS or not? I don't think this is a Safari bug since I noticed the same thing on Chrome as well
When I create a polyline and add it to the map, it will disappear if the map is moved. If I add a polygon or annotation, it remains on the map if the map is moved:
const polyline = new mapkit.PolylineOverlay(path, {
style: new mapkit.Style({
lineWidth: 5,
strokeColor: '#007AFF',
lineJoin: 'round',
lineCap: 'round'
})
})
map.addOverlay(polyline)
// disappears if the map moves or zoom changes
const polygon = new mapkit.PolygonOverlay(shapes, {
style: new mapkit.Style({
fillRule: 'evenodd'
}),
enabled: false
})
map.addOverlay(polygon)
// remains on map when map moves or zoom changes
Why is it inconsistent? How can I make the polyline stay until I explicitly remove it?
Good day, please send the code for your application to TestFlight. Rudolf Chejn
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?