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

iOS Web Push - Passing in Icon Doesn't Work
Hey everyone, I did some extensive testing with sending a Web Push notification to my iOS PWA as well as MacOS Safari browser. The push itself works for those platforms but passing in the icon as specified in: https://developer.mozilla.org/en-US/docs/Web/API/Notification/icon does not work. It always just defaults to using the icon defined in the PWA's manifest instead. In the support matrix in the link above it says Safari is supposed to support this but it doesn't. I just wanted to get some second opinions to confirm that it's a known issue that it's broken? I know iOS Web Push was just supported fairly recently so I'm hoping this gets resolved in the future for us to pass in custom icons.
0
0
533
Nov ’23
webkit crashing on Babylon.js after update to iOS 17.x.x
In my company, we have built 3D configurator using Babylon.js engine. It is used by our clients as an embed on their websites. After the update to iOS 17.x.x we are noticing a notorious jetsam event caused by a possible memory leak, when resizing the canvas. The problem seems to be non-existent on older iOS versions. Safari and Chrome on iOS 17.x.x either reloads the page or completely crashes and reloads the whole app. We've had similar issues in the past and resolved them by limiting the size of the meshes and textures, but further optimization is not possible. After the latest iOS update, the problem returned. Has anyone noticed similar behavior?
1
0
373
Nov ’23
Safari responds to a successful "fetch" of a file:// URL with a status of 0
I built a web application that is designed to be run from my application bundle by using webView.loadFileURL(htmlFile, allowingReadAccessTo: projectFolder) on a WKWebView. Inside of the site's folder is a directory of svg images (from the ionicons project). At runtime the code tries to load one of those images using: req = fetch(url).then((rsp) => { if (rsp.ok) { return rsp.text().then((svgContent) => { if (svgContent && sanitize !== false) { svgContent = validateContent(svgContent); } (code from the ionicons project). The rsp.ok check simply examines the response to the fetch request to see if the status code is in the range 200-299. For the "file://" URL, however Safari on both MacOS and iOS returns 0 in the status. In spite of that 0, however the request has succeeded and the browser has the content of the file. If I modify the code to ignore rsp.ok the following call accessing rsp.text() succeeds. I'm not sure what the expectations are for a file:// URL passed through fetch. Is the 0 status code a bug in Webkit or Safari, or is it an expected result for a file:// URL and the code making the fetch request needs work?
0
0
455
Nov ’23
Deep links are not directing users to the intended apps, instead, they are redirecting to the respective apps on app store
Problem : Deep links are not directing users to the intended apps, instead, they are redirecting to the respective apps on app store. When clicking on a deep link in private mode, it consistently displays a prompt to open the application or cancel. If the "Cancel" button is selected on the prompt, it redirects to the app store via a deep link to open the specific application, on next time onwards we are not receiving the prompt to open application, every time it get redirects to the appstore via merchant link automatically. In other case if we click open button on the prompt , it redirects to the application, Subsequently, each time we click the deep link, it repeatedly prompts us to open the app. Why do the "Open" and "Cancel" buttons lead to different outcomes in these scenarios? How can we ensure that the application always opens when clicking on the deep link, if it is in private mode as well?
0
0
620
Nov ’23
Expected Behaviour of windows appearing when app is full-screened
Hi folks, Got a question on the behaviour of apps when they are in full screen mode, and moreso, when another app tries to show itself. For example, if app A is open and in fullscreen mode, I cannot drag a window from app B (that is not in full screen mode) on top of it. However, I can drag another window from app A (that is not in full screen mode) on top of it. With that said, programtically, I can open a window from app B on top of app A (despite app A being full screened). Is there documentation on the specific rules with regards to an app in full screen, and similarly, an app in tiled full screen (ie split full screened). Trying to understand if the programatic opening of app B window on top of app A (fullscreened) is expected, or a bug, given that manually dragging isn't allowed. Thanks!
0
0
214
Nov ’23
How to view the source code of the request message when opening the network menu in Safari browser (view source code) Safari浏览器的打开network菜单怎么查看请求报文的源代码(view source code)
Mac Safari浏览器版本是:17.0 在菜单-高级选中“开发” 右键单击网页请求以查看“检查元素”菜单,在菜单“网络”中,您可以捕获页面的请求消息。但我发现野生动物园没有观点来源 亲爱的朋友们,Safari浏览器没有这个选项吗? 没有这个选项太麻烦了。 Mac Safari版本是:17.0 在菜单-高级勾选“开发” 在网页请求中鼠标右击可以看到“检查元素”菜单,在菜单“网络”可以捕获页面的请求报文。但是发现safari没有查看来源 各位小伙伴们,safari是没有这个选项吗? 没有这个选项太麻烦了。
0
0
301
Nov ’23
How to view the source code of the request message when opening the network menu in Safari browser (view source code)
The Mac Safari version is 17.0. To enable developer options, go to the menu, select "Advanced," and check "Develop." You can inspect web page requests by right-clicking in the web page and selecting "Inspect Element" from the menu. In the "Network" tab, you can capture the page's request messages. However, it seems that Safari does not have a "View Source" option. Is it the case that Safari does not have this option? Not having this option can be quite inconvenient.
0
1
455
Nov ’23
Leaking WebGLRenderer when rerendering on iOS
I have created a react-three-fiber web-app which uses webgl canvas. When the canvas is forced to rerender due to external change, a new canvas context is being created and the previous one is not lost. This leads to safari refresh and crash as the no of active canvas contexts goes beyond the max limit alongwith the memory. This issue is specific to Safari only and (chrome only on iOS). Does Safari have a different garbage collection mechanism and not include webgl context clear automatically? If it doesnt, is there an API to invoke the same?
0
0
739
Nov ’23
Breakpoints and find problems using pretty printing and original formatting options
I'm testing/debugging a Capacitor app using Xcode and Web Inspector. My Javascript source file initially displays in "pretty print" mode when loaded. Breakpoints are mapped incorrectly in this mode, so are unusable. If I switch to "original formatting", the breakpoints line up, but "find" doesn't work for finding certain sections of code where I want to set breakpoints. So far I've had to look at my HTML/Javascript file in another editor and find the line number, then scroll there in Web Inspector while in original formatting mode.
0
0
454
Nov ’23
Safari browser on iPhone 14 Pro (ios 17.1), Web Speech API encountered problems after Bluetooth speaker connection
Problems when connecting Bluetooth speakers on iOS devices. When trying to use the Web Speech Api -(Text-To-Speech) in safari immediately after connecting to a Bluetooth speaker, it playing the sound using the phone's speakers instead of the connected Bluetooth speaker's. Then, when I summon Siri and briefly use the voice function, the Web Speech API in the web browser uses the Bluetooth speaker, and it works. It seems that there may be some kind of limitation or issue when switching between Bluetooth devices and voice apis.
1
0
466
Nov ’23
Safari ajax request to local http hardware device without ssl, inside a https site?
How start an ajax request to a "local" http adress (hardware device without ssl) inside a https site in safari? Some tips are a pfx file. But a pfx file can no longer be installed on an ios device, since settings->common->certificate trust settings has no longer setting for it. There is only one line "Version" and one more "Trust Asset-Version" - no more settings are available anymore? Any idea? Thanks!
0
0
192
Nov ’23
Why does text selection not work in MacCatalyst app's WKWebView on macOS Sonoma Only
Can not select anything within WkWebView editor view of my MacCatalyst app when running on macOS 14 Sonoma. Any selection gesture or command key fails to select anything in content editable WKWebView, so none of the Editor tools can be activated. My application uses the nnhubbard / ZSSRichTextEditor WKWebView-based Rich Text Editor: https://github.com/nnhubbard/ZSSRichTextEditor. The app is built with Xcode 15.0 or 15.0.1. The app is a Catalyst app that implements an editor view with a ZSSRichTextEditor WKWebView. The problem does not occur if the the app is run in iOS or macOS 11, 12, or 13 (Catalina, Monterey, or Ventura.) The issue only occurs in macOS 14 Sonoma.
2
1
597
Nov ’23
Browser memory limit on IOS
Hi everyone, I hope this a right place to ask questions like this. I have an app which uses WEBGL scene implemented with three.js. At some point of loading, the app crashes (page reloads), which usually indicates that device ran out of memory reserved for this tab. This webgl scene however is fairly light compared to other scenes that load without any issues. How do I debug this? Is it possible to reallocate more memory before page is loaded, or is there a simple way to reduce memory consumption? I have very limited control over 3d scene, and it doesn't use heavy assets (mostly simple geometry with textures on them)
0
0
923
Nov ’23