Safari and Web

RSS for tag

Enable web views and services in your apps.

Posts under Safari and Web tag

159 Posts
Sort by:
Post not yet marked as solved
0 Replies
65 Views
I have one web viewer in React Native for my app, and the function of translate with Google works perfectly in the Safari browser, in my Android App, and on the desktop, but not in the iOS app This is my Google Translate code: function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'pt', includedLanguages: 'pt,en,es', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL }, 'google_translate_element'); comboTranslate = document.querySelector("#google_translate_element .goog-te-combo"); } function changeEvent(el) { if (el.fireEvent) { el.fireEvent('onchange'); } else { // var evObj = document.createEvent("HTMLEvents"); var event = new Event('change'); comboTranslate.dispatchEvent(event); // evObj.initEvent("change", false, true); // el.dispatchEvent(evObj); } } function changeLang(lang) { if (comboTranslate) { comboTranslate.value = lang; changeEvent(comboTranslate); } } function clickChange(){ btn_translate = document.querySelectorAll('.language'); // o que faz os menus acender; btn_translate.forEach(btn => { btn.addEventListener('click', function (e) { var lang = e.srcElement.getAttribute('data-language'); changeLang(lang) }) }) } clickChange(); setTimeout(() => { googleTranslateElementInit() // comboTranslate.addEventListener('change', function (e) {alert('a');}) }, 500); and on the app.json I have: { "expo": { "name": "MyApp ", "slug": "MyApp", "version": "1.2.0", "orientation": "portrait", "icon": "./assets/icon.png", "locales": { "en": "./locales/ios/en.json", "pt": "./locales/ios/pt.json", "es": "./locales/ios/es.json" }, "platforms": [ "ios", "android" ], "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }, "plugins": [ [ "expo-notifications", { "icon": "./assets/icon.png", "color": "#ffffff" } ] ], "updates": { "fallbackToCacheTimeout": 0 }, "assetBundlePatterns": [ "**/*" ], "ios": { "buildNumber": "8", "supportsTablet": true, "bundleIdentifier": "com.myapp", "infoPlist": { "CFBundleAllowMixedLocalizations": true } }, "android": { "package": "com.myapp", "versionCode": 9, "googleServicesFile": "./google-services.json", "config": { "googleMaps": { "apiKey": "AIzaSyDQjE4F3chI8Jy4FA8h45LqA7bMfngoH7Y" } }, "permissions": ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION", "CAMERA", "RECORD_AUDIO"], "blockedPermissions": ["ACCESS_BACKGROUND_LOCATION"], "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#FFFFFF" } }, "notification": { "icon": "./assets/icon.png" } } } I put console.log and alerts to see if the change in the select element of languages is being triggered by the JS, and it's all ok, I really don't know why it is not translating.
Posted Last updated
.
Post marked as solved
6 Replies
1.4k Views
I'm seeing an issue with a PWA when added to the home screen. The Keyboard will eventually stop opening. when clicking on an input field. this happens with bmw.com, instagram.com. Once it happens on one PWA, all PWA's are effected. Is this a known issue?
Posted
by notsle.
Last updated
.
Post not yet marked as solved
1 Replies
80 Views
Hello, We are running a complex web application built with React and related ecosystem. this web application is essentially a PWA and it is offline first. So, It relies heavily on service worker, indexDB database, cache storage, local storage etc. We are running this web application inside a WKWebView which resides in a native iOS App. We have noticed that WKWebView is highly unreliable when it is running such a complex web app. some of the behaviours noticed are only blank screen is shown with no content loaded from the url when url is pointed to different location (say uat, qa, prod environments) in the same wkwebview at run time, it causes data corruption as part of indexdb. it seems that it is not keeping different sets of data for different urls. when registering newer version of service workers, wkwebview errors out and can not proceed with new registrations does not always show a target page when a react app programmatically navigates to different locations within the web app. I am interested in knowing from fellow iOS developers that have you previously experienced above with WKWebView? is WKWebView a good option for running such a web application or SFSafariView is the better alternative? thank you Dilip
Posted Last updated
.
Post marked as Apple Recommended
2.8k Views
My macOS app uses ASWebAuthenticationSession for users to login to a third party service. It's worked fine until Monterey. When I call start on ASWebAuthenticationSession it shows me the permission window as expected: However when I click Continue nothing else happens. It does not show the Safari window and load the login page. I've noticed these errors appear in the Console every time, so it seems it's having trouble opening Safari (even though I have Safari already open). Any suggestions on how to fix this? Surely ASWebAuthenticationSession isn't broken for everyone? error 10:40:50.598301+0000 kernel 43 duplicate reports for Sandbox: com.apple.WebKit(13346) deny(1) mach-lookup com.apple.diagnosticd error 10:40:50.598309+0000 kernel Sandbox: SafariLaunchAgen(5469) deny(1) system-fsctl _IO('h', 47) error 10:40:52.349729+0000 kernel Sandbox: com.apple.WebKit(6675) deny(1) mach-lookup com.apple.diagnosticd error 10:40:53.011948+0000 CoreServicesUIAgent LAUNCH: Launch failure with -10652/ <FSNode 0x60000068b6e0> { isDir = y, path = '/Applications/Safari.app' } error 10:40:53.019505+0000 CoreServicesUIAgent Unable to forward entitlements from overridden keySenderAuditTokenAttr [sess=100005 pid=5469 uid:501,501,501 g:20,20 pV:257536] to target port ( port:85539/0x14e23 rcv:0,send:2,d:0 limit:0), which will likely cause them to reject this AppleEvent, errorRef=[ NULL ]
Posted
by dazboj.
Last updated
.
Post not yet marked as solved
3 Replies
1.8k Views
Hi I have installed IOS 15 beta and have problem with safari. The problem occurred when I closed one of the browser tabs, but when I turned on safari again, this tab came back. after I closed this tab a few times, the safari stopped working and I couldn't even turn on safari. When i click on the safari icon it won't turn on, it looks like i was opening and closing applications immediately safari before it loads.
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
It seems to be a question that comes up often in different ways, but despite several hours of research I still haven't found a solution. I currently face an issue in Safari 14 on MacOS BigSur where cookies are never sent by Safari on XmlHttpRequests to an api on the same root domain. Indeed, i'm working on an Angular SPA where the client app is locally hosted at https://myapp.local and for tests purpose I have an api running locally on https://api.myapp.local. For some requests, we need to attach 2 cookies that are originally set by the API. I am able to see the said cookies in the API responses and in the "storage" section of Safari's DevTools, however they are never sent back to the server for subsequent XHR requests. (XHR with credentials) I did try different cookie's attributes but none of my tries were successful : sameSite=None, domain=myapp.local, Secure, httpOnly sameSite=Lax, domain=myapp.local, Secure, httpOnly The only way I found to get around the problem was to disable the "prevent cross-site tracking" option in Safari's privacy settings (which is not a proper solution for our users since this option is enabled by default...) Nevertheless, I don't understand why Safari consider those cookies as 3rd party cookies (and blocks them) since the API is hosted on the same domain (on a subdomain to be more accurate) than the client web app. And, if I understood correctly, cookies should be sent by browsers for subdomains requests, both with sameSite=Lax and sameSite=None. Especially since it works perfectly on Firefox and Chromium browsers. Anyway, if anyone has an idea or a solution I would be very interested to hear it because I don't know what to try anymore! Thanks a lot !
Posted
by obrassard.
Last updated
.
Post marked as solved
3 Replies
1.2k Views
Hi! Our app (blink.sh) has a browser integration focused on developers, and since latest changes now requires this entitlement to work properly. I have been trying to reach out over email (default-browser-requests at apple.com) more than five times since before Christmas with no response - not even a "case received" or "confirmation from Apple" which is very strange. I also reached out to "normal" developer relations through email and phone, and they took a deeper look at it. They told me that from information they got in this forum, the request may just take an "undetermined" amount of time, and that they could confirm we are using the right email. Unfortunately we have had to launch the new version of our application and limit some of the functionality, which is causing a stir of support issues from our side. Can anyone share what the process has been for them, and if they have received any confirmations along the way? Is there anyone here who could help us get in touch with the right person? Thanks!
Posted Last updated
.
Post not yet marked as solved
1 Replies
405 Views
We are deploying a .net Webapp and running it on iOS and Android devices. On iOS 15 and later, if the app is on the homescreen, then run, put in background and then come back, all inputs like datepicker and selects are not working anymore. So if you click on the select, nothing happens. A restart of the app helps, but if the app is set in background, the same happens again. I've read from others having the same problems, is there anything done against it? Also tried this for iOS 15.4 Beta 4. At the moment we are asking our customers to use the app in safari and not on the homescreen to prevent the freezing. One example input and select: &lt;input data-clear-btn="false" data-db-class="some_db_class" data-db-name"some_db_name" data-db-typ="date" type="date" id="some_id" value="" data-inline="true"&gt; &lt;select data-mini="true" data-inline="true" class="some_class" &lt;option value="-1"&gt;Auswahl treffen...&lt;/option&gt; &lt;option value="0"&gt;Beispiel&lt;/option&gt; &lt;/select&gt;
Posted Last updated
.
Post not yet marked as solved
1 Replies
392 Views
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.
Posted
by rushter.
Last updated
.
Post marked as solved
4 Replies
3k Views
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.
Posted
by pgtaboada.
Last updated
.
Post not yet marked as solved
1 Replies
156 Views
I have used Safari as my primary browser for years now and it has evolved. Some very good updates and some bad. I have noticed since iOS 14 I believe when Apple started slowly implementing more security features that pages would show up wonky or unresponsive at times, but a clear browsing history and cookies would fix this issue. Then in iOS 15 and now 16b1 it’s become almost unusable on certain pages.  Again these issues have been ongoing since the updated security features started rolling out and in non beta releases For example. Some pages won’t load completely or when you try to use a drop down menu the pictures would overlap the drop down. Resets or clearing cookies/cache, history would not fix this issue. Even turning off some of the privacy features wouldn’t resolve this. Menus have become unresponsive, ie. registering a new user on a forum. The menus would are static with no way to change or update your dob or address.  I hope this makes sense so far. So here is what I have turned on and added extensions. Tracking is off in privacy & security [on] Block pop ups [on] Prevent cross-tracking [on] Hide IP and Address - Trackers & Websites // I can’t see it but I believe the Trackers & Websites is set to general location// [on] Fraudulent website warnings [on] Privacy Preserving Ad Measurements  All Advanced Safari settings are default and have not been touched  Extensions - 1Blocker (only these below are on) [on] Block Ads [on] Block Adult Sites [on] Block Annoyances [on] Block Trackers I have tested things for months now, toggling these off and back on. Trying to find the combination that works. I even removed all extensions and ran just the safari settings by themselves and it still renders some type of misfire with sites (menus being static or pictures over lapping drop down menus) The title says it all. How can I get safari back to working and have these privacy features on without the extra bugginess that Safari is doing? Thanks in advance!
Posted
by Whiskey.
Last updated
.
Post not yet marked as solved
0 Replies
131 Views
I'm developing a REST API app that generates some PDFs for my users, but there are only available for a certain period of time. To download them I'm using the a HTML tag: <a href="/api/items/1/generate?type=register" download="Important Letter.pdf"> <svg>...</svg> </a> This works fine in the normal flow of the use case, but if a user request a PDF outside of the download period, the server responds to the request with a 422 (Unprocessable Entity) HTML code, and place a json on the body of the request: HTTP/1.1 422 Unprocessable Entity Content-Type: application/json;charset=utf-8 {"error" : "Registration period expired", "type" : "expired", "data" : {"id" : 1}} Safari does not interpret this error and it generates the Important Letter.pdf file and writes the json content on it. Is there a wat to avoid this behavior and display an error message to the user? I was wondering if my server should send some specific error code.
Posted
by soyPabloG.
Last updated
.
Post not yet marked as solved
3 Replies
1.8k Views
Hello, With the new version of Safari 15.4, the CSS property scroll-behavior: smooth will block the JS scroll on element.scrollTop = xx. The release note says scroll-behavior props will be supported by this new version, but it only blocks scrolls... If I remove the scroll-behavior CSS props, the scroll will work correctly, but of course with no animation. How to scroll with scrollTop but with smooth transition ? There is the good place to report bugs to Safari developers ? Thanks
Posted
by cefjic.
Last updated
.
Post not yet marked as solved
1 Replies
229 Views
Date objects should be able to be constructed with strings formatted as YYYY-MM-DD . On Chrome-based browsers, both of the following are valid: new Date("2022-06-01") new Date("2022-6-01") although the second one does not strictly follow the format. However, it is extremely convenient to work with since you do not have to check for the string length and determine whether to add a 0 in the beginning. Yet, on my Safari browser, the code: new Date("2022-6-01") returns a date object of an invalid date. This is simple to fix, yet it poses an inconvenience during development. Is there any way to let Apple improve its JavaScript engine?
Posted
by neillu.
Last updated
.
Post not yet marked as solved
0 Replies
157 Views
I have the websocket server which enables permessage-deflate to compress massive data. The problem is when I try to use it in webview, the connection was closed. I learned from other discussion that it can be solved by disabling Setting safari =>Advanced=>Experimental Features=>NSURLSession WebSocket, but only for Safari. How can I solve the problem in WKWebview? Or when will the problem be solved?
Posted Last updated
.
Post not yet marked as solved
0 Replies
309 Views
I have been working on a private audio streaming website not unlike SoundCloud, both my website and SoundCloud were working fine before the update. However now that I have updated both sites do not auto play the next song, the metadata gets set but quickly disappears and the audio does not play. I find this unusual because this happens not only in safari but on chrome and DuckDuckGo (apps), but their brother desktop apps do not exhibit the same behavior. it is important to note that the audio WILL auto play the next song when the device is locked.
Posted Last updated
.