Post not yet marked as solved
I'm having issues trying to debug an issue with smart banners. I implemented application: openURL: sourceApplication: annotation in the AppDelegate and this works correctly for a JS window.open forced redirect form the server as well as typing in the urlScheme://path in the browser. However, the smart banner app-argument seems to be passing something different.If I look in the source of a webpage and type the exact same app-argument as what the smart banner has into safari, I'm deep-linked appropriately in my app. If I click the smart banner, then something happens for my code not to parse it properly.It looks like XCode 6 or iOS8 broke the ability to test smart banners by overriding an app store install with XCode. Now if I try to install an XCode build over an app store install, the smart banner will want me to reinstall the app from the App Store.There must be a way to test smart banners other than crossing your fingers and pushing to production?Thanks!
Post not yet marked as solved
Hello.We are experimenting problems with a file download on a PWA (Progressive Web App)In our PWA, we have a button which downloads an Excel file.In Safari the download is working correctly, but when we execute de PWA (by clicking on the icon of the PWA, previously installed with the opcion "share -> Add to home screen") the download doesn't work.- In the headers of our PWA, we have this goals:<meta name = "mobile-web-app-capable" content = "yes"><meta name = "apple-mobile-web-app-capable" content = "yes">- This is javascript code that button is executing:let anchor = document.createElement ('a');document.body.appendChild (anchor);anchor.setAttribute ('download', file);anchor.href = window.URL.createObjectURL (this.response);anchor.click ();anchor.remove ();Could you tell us what the error is and how to solve it?Is it possible, to download a file from a PWA? How?Thanks in advance.
Post not yet marked as solved
I've built a PWA that works in standalone mode on iOS. I've run into an issue where if I search for the PWA via the native iOS app search and I click it, it launches in Safari with all the standard browser UI stuffs which I'm trying to avoid :@
Is it just me or do you see this too? Any way to resolve it?
This lack of perfecting PWA integration in iOS is really starting to grind my gears.
hi there,
I just tested it on iPadOS 14 - issue remains:
Mobile safari started rendering embedded PDFs as images. This is problematic both when viewing and printing:
when viewing, only the first page of the PDF is displayed
when printing, the picture gets printed, leading to incomplete and blurred printing
In both cases the user does not understand the problem is on mobile safari and either does not see/ print the remaining pages or complains about broken PDFs.
The only workaround currently known to me is to provide a download-link that will show the PDF as full page (no embedding). This way the PDF is rendered with multiple pages and printed correctly.
The problem with this workaround is: if the user places the webapplication on the home screen (so it is opened in fullscreen), downloading the PDF as described in the workaround puts the user in a navigation dead-end, as he will not be able to navigate back.
This is an awful situation. The platform is powerful enough to simply embed PDFs in the page. Safari is obviously capable of handling PDFs, as shown with the workaround.
Please fix this. Or do not show PDFs embedded at all, at least user will direct its complaints at Apple and not to us web developers.
I am trying to run JavaScript only after the page has loaded, and according to here - https://developer.apple.com/documentation/safariservices/safari_app_extensions/injecting_a_script_into_a_webpage, I should use DOMContentLoaded. However, it does not seem to work.
This is my content.js file:
function runOnStart() {
document.addEventListener('DOMContentLoaded', function(e) {
document.body.style.background = "rgb(20, 20, 20)";
document.html.style.background = "rgb(20, 20, 20)";
var divElements = document.body.getElementsByTagName('div');
for(var i = 0; i < divElements.length; i++) {
let elem = divElements[i];
elem.style.background = "rgba(255, 255, 255, 0.05)";
}
});
}
runOnStart();
If I take the code outside of the event listener, it runs fine, but a lot of the elements haven't loaded in yet so it doesn't work as it should.
The function is definitely running, but the event listener simply doesn't work. I appreciate any help you can give!
Post not yet marked as solved
Currently, if a page csp disallows inline scripts, but the content script attempts implant inline scripts (DOM injected scripts) - the code will fail to execute.
This is an issue with the current Safari extension model. The effect of this is that content scripts that inject dynamic (user-generated) content can not properly interact with the page context.
This is also an issue with other major browsers, however I do not believe Chrome has this restriction. The reason I say "do not believe" is because the documentation indicates that "page csp does not apply to content scripts", but I have not personally tested this.
I'd like to know is this restriction will be present with the new Safari WebExtension model, especially considering that webRequestBlocking is not supported (which would be the only workaround I am aware of).
Post not yet marked as solved
Hey Everyone,
I’m developing PWA for one project and i found that after update (13.6) on every phone i tested (iPhone 7 plus , iphone Max Pro , PWA Application freeze.
Freeze Mode : Open App
Go to home screen wait 5-10 seconds
Reopen app
If i go to home screen second time and then again return to app it starts working , no console errors .
please help .
service worker with / without has no effect .
Post not yet marked as solved
I'm currently trying to record HTML5 video using the <input> tag.
The way I'm doing this is as so:
<input id="videoFile" type="file" accept="video/*" capture="user"/>
This works, but the video is always in 360x480 resolution. I wish to know if there is a way to increase this.
I've tried going into the camera settings of my iPhone XR, but none of the 6 options there make any difference to the recorded video.
A source I found from 2016 said that 1080p 60fps would work, and the rest would not. I think this may have changed since.
If this is a duplicate question/issue, I apologise as I have not found it.
Thanks for any help!
Post not yet marked as solved
Issue
My web application built using nuxt and installed as web app on iphone becomes unresponsive after I open or visit an external link from the app. Issue specifically comes iOS 13.4 and above on real devices. Simulators works fine.
Devices
iPhone X and XI (all versions) with iOS 13.4 and above
Steps to reproduce
Open nuxt-min-pwa.netlify.app safari.
Tap on share icon and then add to home screen.
Open app from home screen.
Tap on menu icon.
Tap on second.
Tap on link named ICE.
App will open an external url.
Tap on Back to App button to return to the app.
Tap on second now.
10. App does not responds. A thin loading bar seems to be in progress, everytime second is tapped. But nothing else happens.
Web app is working fine in iphone8 (tested with ios13.3.1 and ios 13.6.1) and Xcode simulators.
Post marked as Apple Recommended
We’ve been waiting on a response for default browser entitlements since August 12th when we responded back to “default-browser-requests@apple.com” with the requested data (team id, team, bundle id) & a TestFlight like with the proper changes.
Now with iOS 14 out, our users are now expecting for defaulting capability like other major browsers.
What can we do to continue the process? We just want to deliver the best service to our users.
Best,
Post not yet marked as solved
Currently trying to port a web extension over to safari which heavily relies on the include\_globs property of content\_scripts.
Is this something Safari plans to support?
Post not yet marked as solved
I'm trying to record my screen (canvas) on iPad safari with the new experiential media recorder support.
I got the mediaRecorder object and it triggers the start event but the issue is whenever mediaRecored record blob it will not trigger the stop event.
It is working fine of MAC Safari but on iPad Safari I'm getting this issue.
Is there any ways to get the stop event so mediaRecorder fire ondataavailable method after stop on iPad Safari?
Post not yet marked as solved
There is an example on MDN with Webshare API: mdn.github.io/dom-examples/web-share/
On iOS 14 device (test with iPhone 7 / iOS 14.0 / Safari) it works fine only once. For the second time it throws permission error:
Error: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Here are all the steps to reproduce: Go to MDN Webshare API - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share
Find a link to Web share test in "Examples" section and open it
Click "Share MDN!" button
Choose one of suggested options or just close sharing popover
Click on "Share MDN!" button again
See the error
Do you have any suggestions how to fix that? Is it a known bug?
Post not yet marked as solved
My app has a WKWebView which loads the certain HTML, CSS and JavaScript files. When the WKWebView is opened and files load initially, the memory usage of my app remains relatively low. If I start to use the application, in some time (5 mins) the total system free memory drops drastically and reloads the app. At that point the WKWebView reloads itself; there is no console message, no crash log, nothing. At most I'll see an Xcode message about my device having "BKSProcessAssertion 'ConnectionTerminationWatchdog' initialized with invalid pid".
The WKWebView has the markings of a memory leak and even if I remove the variables or objects their memory sticks around.
Is there some way to release any memory it's holding in order to avoid reloads of the app?
Post not yet marked as solved
Right now, it seems iOS will black the video and mute the audio in a iOS Safari WebRTC application when an inbound cellular call arrives.
(I assume this is an attempt to prioritize cellular calls over Safari.)
As far as I can tell there is no DOM event that notifies the app/javascript that this has occurred or that the video has been "blacked".
I've tried periodically taking canvas copies of the video to look for black, but it appears that the DOM thinks the video is still playing.
Is there a way to detect that the video has been "blacked out" by the incoming phone call, and maybe also tell if the "pause" is over.
I suppose this could be solved by iOS removing the blackout/mute when the call is over or declined. It's also somewhat of a privacy problem as the broadcast part of the WebRTC connection remains (so the other parties can hear your phone call without you realizing it.)
Any help or best practices? Is this the only option Apple provides to get an answer?
In our app we're performing authentication using ASWebAuthenticationSession. SSO seems to work fine in iOS 13 for different paths for the same domain but when running the same app in iOS 14, cookies don't seem to be attached to subsequent requests once authenticated in safari window.
I'm not sure if it helps :
Looking at the logging in instruments when running the app in iOS 14 device, I can see :
00:09.690.903 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Faulting in NSHTTPCookieStorage singleton
00:09.690.929 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Faulting in CFHTTPCookieStorage singleton
00:09.690.944 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Creating default cookie storage with default identifier
(Above logs don't happen in iOS 13)
and later in iOS 14:
00:10.113.701 Debug iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631c Task <88E60E41-6B7B-4787-ABF6-B65C92C8FF4E>.<1> request https://testb2c.b2clogin.com/testb2c.onmicrosoft.com/b2c_1_susi/oauth2/v2.0/token is NOT allowed to set HSTS for main doc
In iOS 13 :
00:15.570.171 Debug iOSB2C (5320) CFNetwork Default iOSB2C 0x24045d Task <79A2078B-718D-4D4D-A46D-1FF1B2238431>.<6> request n/a is NOT allowed to set HSTS for main doc
00:23.139.303 Debug iOSB2C (5320) CFNetwork Default iOSB2C 0x24045d Task <88D45825-FB1E-4C38-8EFF-87A8528B61E3>.<7> request n/a is NOT allowed to set HSTS for main doc
Has anyone noticed similar issue with ASWebAuthenticationSession?
Post not yet marked as solved
Hi there. I am have just updated my Big Sur beta to the latest version. Since updating; I have been experiencing major issues on Safari with some of my streaming services; mainly Netflix, Youtube, HBO Max and Prime Video. I researched a bit and found fixes by switching the VP9 Decoder setting off. This fix has helped only for YouTube but I still experience streaming issues with the other services. Does anyone know of any other fix I can use to solve this issue?
I would sincerely appreciate the assistance!
Post not yet marked as solved
I have had this issue since the first Big Sur beta and with every update since. I used Apple's Feedback Assistant since I had this issue.
Try it yourself - type in any browser on your computer any website that uses .app as its top-level domain (TLD) - get dot app or mmhmm dot app.
Here is my Feedback Assistant issue number - FB8304994 and here is the text of it - Any and all .app top-level domains (TLDs) do not open in any browser windows.
Try to open 3rd party website mmhmm.app or Google’s get.app (Google registry) and they will not open.
When pinging them I get returned to 127.0.0.1 (localhost).
Edited /etc/hosts file to add domain addresses and then the sites open.
But this appears to be an issue of the OS and was not happening prior to the install of Big Sur OS.
These domains are used for developers websites.
I would really like to know if this will be fixed in the final release or sooner.
Post not yet marked as solved
When the sandbox directive is included in the contentsecuritypolicy, even when it includes allow-scripts, it breaks all functionality from the extensions. It seems allow-scripts is simply ignored.
When including something like http: or https: in the connect-src and img-src directives of the contentsecuritypolicy of webextensions, they are simply ignored.
Other matches like https://*.example.com/ work as expected.