Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.

General Documentation

Post

Replies

Boosts

Views

Activity

PWA and webpush notification
hi anybody have issue about pwa and webpush notification using FCM? with latest webpush and ios 17.x or 18.x 1-2 notification arrived but if iphone will be standby or webapp closed the service worker not receive notification
0
0
168
Oct ’24
Building a Safari extension - but Safari doesn't see it
I'm trying to build a (personal) Safari extension, which should add an HTTP header when visiting a few websites. I'm a newbie at XCode. Using XCode, the build runs and the app runs correctly (the standard boilerplate code tells me that the extension is currently off). However, the extension doesn't appear in Safari>Settings>Extensions at all, so I cannot enable the extension. There are two warnings (warnings? or errors? fatal? or not?): NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed Unable to create bundle at URL ((null)): normalized URL null ...I'm brand new to XCode so I don't really know whether these errors are fatal, and how to fix them if so. These warnings appear when the app runs, not during the build cycle. The plugin appears when issuing this command in Terminal: pluginkit -mAvvv -p com.apple.Safari.web-extension ...part of that response is: podnewsllc.Podnews-Security.Extension(1.0) Path = /Users/jamescridland/Library/(snip)MyApp.appex UUID = EA41(snip)3519 Timestamp = 2024-10-06 03:54:37 +0000 SDK = com.apple.Safari.web-extension Parent Bundle = /Users/jamescridland/Library/(snip)MyApp.app Display Name = MyAppName Extension Short Name = MyAppName Extension Parent Name = MyAppName Platform = macOS ...so it's visible to Safari, but it doesn't appear in Safari>Settings>Extensions. The codesign command says: --prepared:/Users/jamescridland/(snip)__preview.dylib --validated:/Users/jamescridland/(snip)__preview.dylib --prepared:/Users/jamescridland/(snip).debug.dylib --validated:/Users/jamescridland/(snip).debug.dylib /Users/jamescridland/(snip).appex: valid on disk /Users/jamescridland/(snip).appex: satisfies its Designated Requirement ... so I think it's signed correctly. Checking "Allow unsigned extensions" does not appear to change anything. I've tried running a rebuild of LaunchServices, but that hasn't fixed it. /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user My questions are: Is there a log to help me know what is going wrong? Does anyone have any idea why I can't see the extension in Safari? What next? Sorry for the dumb question.
1
0
308
Oct ’24
Questions Tags Saves Users Companies Labs Jobs Discussions Collectives Communities for your favorite technologies. Explore all Collectives Teams Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. Lookin
I have an iframe for google map on this site: https://www.crumpler.com/pages/new-shop You can see the map upon clicking any location from the list. I am able to pinch and interact with the map on my iphone 14 and other mobile devices. But on older iphones on not-the-latest version of safari (iphone 13 mini and below), I am not able to interact with the map. Have you guys met with this problem before? Why might that be the case, cause I can interact with map embeds on other sites like https://nustem.uk/about/planning-your-visit/ on older iphones too?
1
0
283
Oct ’24
iOS 18 upgrade: website map point text now missing after
My website ccflood.us is a simple map that uses a CSV file for the data that is displayed on the map. It uses the ESRI JS API. Recently the points on the map began missing the text in the boxes only on Apple devices that have been upgraded to iOS 18. Has anyone also had this happen to their site? If you have upgraded to iOS 18, try this site on your iPhone then look at it on an Android phone or your desktop browser. You should seet the values in the boxes and a "+" at points that have no value. If you've had this happen with your site or have heard of a fix, please reply to this post.
0
0
216
Oct ’24
Safari Web Extensions: tabs.onRemoved unexpectedly thrown on url changed.
I have noticed that tabs.onRemoved works differently in Safari 18 comparing to other browsers and Safari 17. Open a tab e.g. apple.com Take note of the active tab id using this code: browser.tabs.query({currentWindow: true, active: true}, (x) => console.log(x[0].id)) Add a listener on onRemoved: browser.tabs.onRemoved.addListener(console.log) on the active tab, navigate to e.g. https://developer.mozilla.org Take note of the active tab id again (using the same tabs.query). Expect: there should be no console.log of onRemoved. the active tab id stays the same. Actual: there is a console.log of onRemoved. the active tab id is changed. Please help. If this is a bug introduced in Safari 18, it would break a lot of JS Web extensions.
1
0
366
Oct ’24
Iframe LocalStorage is Lost when opening a new window
I have a homepage with an iframe containing my app LocalStorage, but when opening my app page the LocalStorage is lost. structuration of the page: homepage : domain.com iframe and app : app.domain.com the localstorage is set up directly within the iframe and postmessage between iframe and parent works. We see in the parent page that the LocalStorage for the sub-domain is set but opening the sub-domain on a new window it disappears : The problem is detected On Safari 18 only.
0
0
287
Oct ’24
declarativeNetRequest.getMatchedRules() does not return the blocked URLs of the current website until refreshed
We used declarativeNetRequest.getMatchedRules() to retrieve the blocked URLs. While we do receive a list, we noticed that the URLs captured do not always reflect the ones the content blocker is actively blocking at that moment. However, upon reloading the same page, the correct URLs appear. Screenshots are attached for your reference. First load: After reload:
2
0
329
Oct ’24
Unable to Launch Safari Driver
I am encountering an issue where we are unable to run or launch Safari Driver in our automation tests using macOS. When attempting to run safaridriver -p 8888 from the terminal, we receive the following error message: ERROR: safaridriver could not launch because it is not configured correctly or you need to authenticate. Re-run safaridriver(1) and pass the '--enable' flag to configure and/or authenticate. For more information, consult the safaridriver(1) man page. Despite running sudo safaridriver --enable as an administrator (even as root), the issue persists. I’ve searched through various online forums and GitHub repositories but couldn’t find a working solution. Some references are: Apple Developer Forum Thread: https://forums.developer.apple.com/forums/thread/762321 GitHub Issue: https://github.com/SeleniumHQ/selenium/issues/11381
2
0
179
Oct ’24
Problems with update to Safari 18
Since update to Safari version 18 our browser extension stopped working. Our developers came to following conclusions:
 After saving a state of the extension (communication of the service_worker background script), the extension is blocked until user clicks to other window than Safari. After that the extension restarts and everything works correctly. Until next interaction with extension on the option page and popup window. We use for communication functionality chrome.runtime.onMessage. Extension sometimes incorrectly loads data from chrome.storeage.local and user loses all data Options page is always displayed in the new window instead of the new tab All problems described above were not happening in Safari version 17. Unfortunately there is no advice in the developer community, how to fix these problems. Anybody here experiences same problem or has a solution for it?
4
1
375
Oct ’24
EventSource: event 'error' not fired in iOS18
Hi, I noticed that event 'error' from EventSource is not fired in latest iOS 18, when web application is minimized and then re-activated. This was working in previous versions, so it is probably regression bug. Behavior in iOS 17: PWA application has active SSE/EventSource connection with server. Then some other application becomes active for more then ≈20 sec, so that SSE connection is closed. After SSE connection is closed, application is opened again. When application becomes visible, 'error' event is fired. This is expected behavior and this way also works on other non-iOS systems. Behavior in iOS 18: Following same steps as before it looks like that error event is not fired. Also,readyState of EventSource is 1 (EventSource.OPEN ), even if SSE connection is closed. If connection is interrupted when application is in foreground, then error event is fired on both iOS versions. This is quite problematic, because previously you could rely on 'error' event to trigger reconnection, when application becomes visible, but now this is not possible. Also EventSource readyState is 1, even if there is no connection to the server, so it is in wrong state. Any thoughts?
1
1
293
Oct ’24
Safari Web Extensions: storage.local.get unexpectedly returns undefined
I have noticed that storage.local.get API works differently in Safari 18 compare to other browsers and Safari 17. browser.storage.local.set({abc: 123}) browser.storage.local.get(console.log) // {abc: 123} browser.storage.local.get({abc: null}, console.log) // expect {abc: 123} but got undefined instead. According to MDN, storage.local.get should work with an object with object names as keys and the default value as value. According to Safari 18 Release notes, this may be related to a fix: 'Fixed getting an empty key from storage. (99440265) (FB11427769)'.
2
1
424
Oct ’24
faulty Transparent Video in iPhone browsers
I need to play a Video with transparent background on our website. It works perfectly on Windows, Mac & Android (in all browsers). On iPhone however, no matter what Browser, The transparent parts of the video act almost like an "overlay", making everything behind it a lot brighter. This effect gets worse, the higher I set the iPhone screen brightness. This is of course not the behavior I'm looking for. The Video Element has two listed sources. One .WEBM (VP8 with alpha channel) and one .MP4 (HEVC with alpha channel). I am sure, that something is wrong with the MP4 file, but I don't understand why it works in Safari on Mac, but doesn't on iPhone. Shouldn't they both play the same File? Here is my workflow: masking the subject in DaVinci Resolve exporting as QuickTime - Apple ProRes 444 - "Export Alpha" using Shutter Encoder (v15.7) to convert the file to H.265 (.mp4) under "Advanced Features": Hardware acceleration to "OSX VideoToolbox" & check "Enable alpha channel" also converting the first file to VP8 (.webm) with "Enable alpha channel" then adding the Videos to the website like this: <video height="450px" autoplay loop muted playsinline disablepictureinpicture> <source src="(url of the mp4)" type='video/mp4; codecs="hvc1"'> <source src="(url of the webm)" type="video/webm"> </video> Here is how it looks on Safari (Mac) This is what it looks like in any browser on iPhone I have re-exported, re-converted and re-implemented it multiple times and I just can't get it to work on iPhone. Does anyone have an idea, what the cause could be, or what I can do differently?
2
0
423
Oct ’24
Apple Pay ios 18 Scannable Code returns Service Unavailable
I have a working Apple Pay transaction page that works on Safari. But with the new ios 18 update and Apple Pay JS library. I see that a pop up sheet with the scannable code is shown on chrome browser. I tried that. Upon scanning the code with iPhone 15 pro max. The apple pay payment sheet is shown on the phone but with an error Service Unavailable. What do I have to do to make it work? What went wrong? I checked the logs and have no clue of what is failing.
2
3
502
Sep ’24
Error: Invalid call to runtime.connect(). No runtime.onConnect listeners found.
Hi, I am developing the Click & Read web add-on for Chromium, Firefox and Safari. We use xcrun safari-web-extension-converter tool to generate the Safari add-on. The build on Xcode had no meaning errors/warnings, until we had to switch to a more up-to-date MacBook (required as deprecated Mac had no support for latest macOS and thus for Xcode compatibility !). So now I build my add-on on an Apple M1 MB Air on Sequoia 15.0 with latest Xcode, but I encounter an error ? or warning ? : NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed Unable to create bundle at URL ((null)): normalized URL null Unable to create bundle at URL ((null)): normalized URL null Unable to create bundle at URL ((null)): normalized URL null But it doesn't prevent the add-on build to complete as I am able to open it onto Safari. Then, when loading the add-on on a test web page, I get this error on safari console: Error: Invalid call to runtime.connect(). No runtime.onConnect listeners found. BTW, the same add-on Dist works as expected on Chrome or Firefox (on macOS). So it seems the runtime listener runtime.onConnect.addListener isn't initiated on Background script... Thanks for your feedback and help
6
0
538
Sep ’24
Dependent Fields Not Opening in Safari
Dependent fields for multi-select options and dropdown fields are not displaying in Safari, although they work correctly in Chrome and Firefox. Scenario You have a form built with ASP.NET and Razor, where users need to select multiple options from a dropdown list to trigger the display of dependent fields. Multi-Select Dropdown: The form has a multi-select dropdown for choosing different categories (Category A, Category B, etc.). Dependent Fields: Based on the user's selection, certain dependent fields should become visible. For example, if the user selects Category A, an additional input field titled "Details for Category A" should be shown. Expected Behavior (Chrome & Firefox) When the user selects Category A or Category B, the corresponding input fields are displayed dynamically, functioning as expected. Issue in Safari : In Safari, the dependent fields do not show up when a user selects any category. It's as if the JavaScript or the CSS responsible for displaying these fields is not executing correctly. CHROME SAFARI Browser: Safari (Version 18.0 (20619.1.26.31.6)) Operating System: MacOS (sequoia 15.0) Device: MacBook Pro 14 Inch Apple M3 Pro , iPhone 14 iOS 18.0
0
0
209
Sep ’24
WKWebView Synchronous Ajax/XmlHttpRequest timeout
PLATFORM AND VERSION iOS Development environment: Other: Xamarin iOS App Run-time configuration: iOS 14.4.2 and above DESCRIPTION OF PROBLEM We are using WKWebView control in our application. It loads a page, wherein there is a code which gets triggered to execute a Synchronous Ajax/XmlHttpRequest. This request needs about 1 min time to complete, but it gets aborted after 10 secs. Observed in iPhone 6S 14.4.2. Also seen the same behavior in the latest version of iPhone and iPad OS. Need help on the below points: How can I extend this timeout? Making it an Asynchronous call would have regression. Hence the ask for any other alternative to extend this timeout. STEPS TO REPRODUCE In the WKWebView have a webpage, which gives a Synchronous ajax/XmlHttpRequest call to a Web API, which takes more than 10 seconds to complete. The Ajax call sample code is as below, which uses jquery: var startTime = performance.now(); $.ajax({ async: false, // Synchronous ajax call type: "POST", url: "http://testsite:8000/api/RunTestTimer", contentType: "application/json; charset=utf-8", data: JSON.stringify({ timeInSeconds: 15 }), // timeInSeconds is the parameter name in the Web API, which I used to run a timer on the server-side for the value passed to the ajax call dataType: "json", beforeSend: skelta.forms.utilities.addRequestHeaders }) .done(function (result) { var endTime = performance.now(); var message = "Request Successful (Time Taken to execute: " + ((endTime - startTime) / 1000).toFixed(3) + " secs; Type: " + "POST" + "; Async: " + "FALSE" + "; Timer: " + "15" + " seconds):" + JSON.stringify(result); console.log(message); }) .fail(function (result) { var endTime = performance.now(); var message = "Request Failed (Time Taken to execute: " + ((endTime - startTime) / 1000).toFixed(3) + " secs; Type: " + "POST" + "; Async: " + "FALSE" + "; Timer: " + "15" + " seconds):" + JSON.stringify(result); console.log(message); });
1
0
331
Sep ’24