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

In iOS 18, browser.tabs.getSelected returns 'Undefined' for the Safari iOS App Extension
I was able to obtain the URL in iOS 17+ and lower versions by using the browser.tabs.getSelected method in background.js, and it was successful. I upgraded to iOS 18 and now this function is returning 'Undefined'. As a result, the Safari Extension feature is broken. Is this browser.tabs.getSelected no longer available or deprecated as of iOS 18? As an alternative, browser.tabs.query functions. is a useful substitute for that.
3
0
498
Aug ’24
push notification on safari not work.
I am developing a web application with PWA and Vue.js (javascript). I would like to add a Web Push notification function, so I referred to the following site to execute notification permission and received the response result "granted". https://developer.mozilla.org/ja/docs/Web/API/Notification/requestPermission_static I have tried both requestPermission(); and requestPermission(callback). However, in this state, an error occurred when subscribing to pushManager, and push notification registration could not be executed. As a workaround, I found that by changing the notification permission setting from the OS Settings > Notification screen to Off and On, subscribing to pushManager was successful. Is there anything else I need to implement other than calling requestPermission(); or requestPermission(callback) to make it executable without following the workaround steps? In addition, this phenomenon was not occurring around the beginning of June 2024, and it was confirmed that the problem occurred as of August 5th. The confirmed OS and models are as follows. iOS 17.4 Mobile Safari iPad iOS 17.3 Mobile Safari iOS 15.8 Mobile Safari iOS 17.3 Mobile Safari iPad iOS 15.8 Mobile Safari iPad iOS 17.4 Mobile Safari iOS 16.7 Mobile Safari
0
0
398
Aug ’24
Flutter Webview permission issues
nw_application_id_create_self NECP_CLIENT_ACTION_GET_SIGNED_CLIENT_ID [80: Authentication error] Failed to resolve host network app id Invalidating grant <invalid NS/CF object> failed The above rights issue comes up NSAppTransportSecurity NSAllowsArbitraryLoads This authority has already been set up
0
1
577
Aug ’24
Inconsistent Memory Management in Safari on iPhone 12 Pro
We have tested on iPhone 12 Pro and observed that Safari allowed approximately 1.5GB of RAM usage. Page refreshes when trying to allocate more memory. After performing a hard reset and erasing all content, I noticed that Safari allowed approximately 3GB of RAM usage for our webpage. However, after 2-3 days, the maximum allowable RAM usage in Safari decreases to about 1.5GB. Once 1.5GB limit is reached, the system reloads the page. To further investigate, I performed another hard reset on my device, and once again, Safari allowed around 3GB of RAM usage. Additionally, we tested this on iPhone 15 Pro and 15 Pro Max, where the RAM limitation in Safari is consistently around 3GB (page is reloading after reaching 3GB). Could you please clarify why the memory limit fluctuates after hard reset? Is there any specific setting or flag within Safari or iPhone that controls the maximum RAM usage, which could be causing this behavior? I also posted the issue there: https://bugs.webkit.org/show_bug.cgi?id=277848 I would appreciate any guidance or potential solutions to this issue. If this is a known limitation or issue, understanding the root cause would be extremely helpful. Thank you for your attention to this matter. Model Name: iPhone 12 Pro iOS Version: 17.5.1 Capacity: 128gb
1
1
222
Aug ’24
Safari only browser to block GET requests to our dockerized web application
Hi, We are running a React application as a pod on a Kubernetes cluster with an Nginx Ingress, which needs to make requests to a server running Apache. On Safari only (all other browsers are fine) and on all browsers on iOS, the React application is unable to get a response from the Apache server. We can see the server is responding and we can see the pod is getting the responses too, they are all logged as 200 on both sides. Here is what we are able to see in the developer tools on Safari: The also console logs "Failed to load resource: The network connection was lost." We have tried solutions such as this and this, as well as many other solutions we could find on various forums but nothing worked so far. I repeat myself here: this only happens on Safari on desktop and on all browsers on iOS, other browsers such as Chrome and Firefox are unaffected. Has anyone ever ran into a similar issue or have an idea about how to fix this?
0
1
287
Aug ’24
ios17 remember full screen status and playsinline not working
I encountered an issue when playing WebRTC video using the H5 video tag on an iPhone with iOS 17. After performing the following operations, the video automatically plays in fullscreen mode: Create the video tag, specify the playback source, and set the autoplay attribute to true. Call the API to enter fullscreen playback mode. Exit fullscreen by swiping with a finger. Stop playback and destroy the video tag. Repeat step 1; at this point, the video does not correctly default to inline playback but instead automatically plays in fullscreen. It seems as if the system has cached the previous fullscreen state, even though I have exited fullscreen, and the same result occurs with different browsers. I have set the 'playsinline' and 'webkit-playsinline' attributes for the video tag. Anyone encountered the same issue? I would appreciate any solutions that can be shared.
0
0
234
Aug ’24
How can I create a long lasting cookie in Safari?
I have a tipical web app setup where a front end SPA app (Blazor WASM) is communicating with a backend (.NET API). I control both environments and they are hosted at following locations: SPA: https://www.client-portal.company.com API: https://www.api.client-portal.company.com I use cookie authentication to authenticate users via the invite/confirmation code process. The problem is that I want to make a long lasting authentication cookie but Safari (and ONLY Safari) keeps setting the cookie to expire in 7 days. Now I am aware of the Webkit's tracking prevention policies defined here: https://webkit.org/tracking-prevention/#intelligent-tracking-prevention-itp However I'm either unable, or not smart enough to understand the first vs. second vs. third party logic defined there. In my head, the setup I have is the first party setup and I would imagine that many companies have a similar hosting setup/naming. I cannot place the API under the same URL as the front end app unless I do some reverse proxy YARP setup which seems like an overkill just to satisfy the policy of one browser. Am I missing something obvious here? Can you please tell me how/where/what URL should I host my SPA/API in order for the cookie to persist beyond 7 days? For the reference the cookie being created has the following properties: DOMAIN: client-portal.company.com HOSTONLY: true SECURE: true HTTPONLY: true SAMESITE: Strict PATH: / Any help would be greatly appreciated. Thanks!
0
0
164
Aug ’24
Looking for feedback on a Swift dev tool idea
I know this is a more abnormal question to ask on this forum but I really would like to gauge feedback from a community of other Swift developers on an idea. A colleague and I are seriously considering building a open-source web based SwiftUI component catalog that feature a collection of prebuilt modular components very similar to Shadcn for those of you who have worked in React but for SwiftUI where you can also contribute your own SwiftUI elements. Im curious if this would be something iOS/Swift devs would be possibly interested in and would love to hear thoughts on this idea. This is not a component library as Xcode technically has one thats built in, but rather fully built out SwiftUI elements such as UIs that use glass morphism for macOS, calendars for iOS apps, charts, etc.
1
0
302
Aug ’24
Certain Docusign Url does not load on IOS 17.5.1 but works on 17.4.1
Hello, We are seeing a behavior where we find that a certain Url (docusign signing ceremony which is a webpage) works fine on Ipad with OS version 17.4.1 but NOT on Ipads with 17.5.1. This behavior is exactly same if I use chrome browser, safari browser or our custom application (Maui Application and we host the signing ceremony) I am not sure but since the OS is the difference here just wondering if there can be a potential issue here. or its still the cert issue from the provider. NET::ERR_CERT_AUTHORITY_INVALID - is the error shown in Chrome and Safari shows "Safari can't open the page because it could n't establish a secure connection t the server".
0
0
232
Aug ’24
TLS encryption / certificate requirements for Safari
We've had no end of troubles using Safari with internal CAs for internal applications. Every other reasonably-modern browser works fine, but Safari gives us "Safari can't open the page because Safari can't establish a secure connection to the server ." I've not been able to find a list of the specific requirements that Safari has for allowing secure connections, and there doesn't seem to be a way to get a more useful error message out of Safari (does nobody believe in good error reporting anymore?). Our servers are compatible through TLS1.3 and support reasonably modern encryption suites. We do use long-lived certificates on internal hosts, but my understanding is that Safari should be accept this with private CAs (and some of these hosts have zero support for certificate automation, handling this manually would be an obscene amount of work, and if a threat actor can pull private keys off of them then they already have root and this isn't solving anything). Is this documented anywhere, and if so could somebody please be kind enough to point me in that direction?
0
0
143
Aug ’24
iOS 18 - Webcam video not rendered within page without interacting with browser chrome
We have a service providing identification services via video, i.e. users get on a WebRTC video call and follow some instructions, all the while seeing themselves full screen. So this web site displays the user's camera full screen with a few overlays. In iOS 18 beta, this stopped working; the video isn't rendered anymore. The remote end of the conversation can see the video fine, so the camera itself and WebRTC are working. No errors in the console. When tapping the site settings button in the address bar and the font size/reader/translate page dialog pops up, now suddenly the video is being rendered just fine, immediately. It suggests it was there the entire time, Safari just didn't bother actually showing it. It's hard to create a minimal reproducible example for this. The behaviour just suddenly changed starting with iOS 18 beta. Has anyone observed something similar or has any tricks which may enable a workaround?
0
0
338
Aug ’24
What is the behavior of text encode when OOM occurs
I have some questions about the behavior of encode. For example, with the following code, when we encode a very large string, the result is an empty array. So if memory allocation fails due to insufficient system memory or other reasons, and the returned Uint8Array is not successfully created, what will we get? An empty array, an exception, or an OOM crash? const encoder = new TextEncoder(); const encoded = encoder.encode(largeText);
0
0
244
Aug ’24
Websocket getting cut off when working with CallKit API, iOS 17.5 and higher
Hello! I've been maintaining a Cordova-based calling application for years. Cordova uses a webview to show the user interface and has a bridge for calling native iOS API from JavaScript. The application uses CallKit and VoIP push notifications to handle the calling functionality. Before the iOS 17.5 update, calling worked relatively stable. However, starting from this version and on, Safari instantly force-closes all open websocket connections when the "Answer" button on the calling UI is hit. So, basically, the call ends right after it answers, because in our case websockets are crucial for the SIP negotiation process. Firstly, I inspected the Safari console, and there is a new red error saying: WebSocket connection to 'wss://home.thirdlane.com/wss' failed: The operation couldn’t be completed. Software caused connection abort. Secondly, I checked the Xcode logs, and there are several warnings saying Invalidating grant <invalid NS/CF object> failed every time the call is answered. And, I'm afraid this is all that I have to cling to. I managed to mitigate the effect by connecting the websockets only when the call is answered and the application is focused. However, this approach has its own drawbacks and doesn't solve all the problematic cases. I must mention that the behavior has slightly improved in iOS 17.6 – now the websockets are cut after the "Answer" button hit whereas in 17.5.1 they were cut in ~3 seconds after the VoIP push regardless of whether the answer was made. This looks like a Safari/WebView bug to me and I would like bring it to the Apple's attention. I've never filed a bug before, so hopefully this is the right place to write. I can provide more logs or vidoes upon request. Thank you!
0
0
480
Aug ’24
modifyHeaders safari extension not works
Does safari support modification of request headers by using declarativeNetRequest? I want to change the sec-fetch-dest, sec-fetch-mode value in request header using declarativeNetRequest. So I just set the manifest value as follows. { "manifest_version": 3, ... "name": "modifyHeader test", "description": "sample extension", "version": "1.0", ... "permissions": [ "declarativeNetRequest", "declarativeNetRequestWithHostAccess", "activeTab" ], "declarative_net_request": { "rule_resources": [ { "id": "ruleset_for_test", "enabled": true, "path": "test_rules.json" } ] }, "host_permissions": [ "<all_urls>" ], .... "content_scripts": [{ "js": [ "content.js" ], "matches": [ "*://www.acmicpc.net/*" ] }], .... } And test_rules.json is as follows { "id": 1, "priority": 1, "action": { "type": "modifyHeaders", "requestHeaders": [ { "header": "sec-fetch-dest", "operation": "set", "value": "document" }, { "header": "sec-fetch-mode", "operation": "set", "value": "navigate" } ] }, "condition": { "domains":["acmicpc.net"], "resourceTypes": ["xmlhttprequest"] } } However, safari does not change the request header. So I just wonder does safari allow modification of headers through declarativeNetRequest.
2
0
350
Jul ’24
SafariDomains Per App VPN Profile Error on iOS 18.0
Operating System Version: iOS 18 (from beta 1 to beta 4) We have a VPN app that installs a per-app VPN profile with SafariDomains to filter Safari network traffic. This setup works as expected on iOS versions lower than 18.0. See here more details on SafariDomains: https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf On iOS 18, all SafariDomains configured to go through the per-app VPN result in the following error: "Safari can’t open the page. The error was: Unknown Error" Additional Details: Only SafariDomains encounter this error. Other managed apps traffic through the per-app VPN works correctly. Steps to Reproduce: Install the VPN app with a per-app VPN profile. Configure SafariDomains with any URL (e.g., example.com). Open Safari and navigate to the configured URL. Example Configuration: We tested with a simple example by adding only one URL to SafariDomains (example.com). Logs from the console were captured at the moment Safari opened and encountered the error. example7.txt Has anyone else encountered this issue on iOS 18? Any insights or solutions would be greatly appreciated. Thank you!
1
4
267
Aug ’24