Safari is the web browser developed by Apple and built into all Apple devices.

Safari Documentation

Posts under Safari tag

399 Posts
Sort by:
Post not yet marked as solved
0 Replies
232 Views
My Safari Web Extension app for iOS sometimes exhibits an issue where the request to SafariWebExtensionHandler sometimes doesn't return. This never happens on the simulator, and never happens when I'm actively debugging the SafariWebExtensionHandler process. It only happens on a physical device, and it only happens about 5% of the time. Note that the request happens RIGHT when the page loads (document_start), so I wonder if there's some kind of race condition happening, or a bug in iOS. No errors are thrown, and I've pared back the logic to be extremely simple, and I still see the issue persist. I'm PRETTY sure it's the SafariWebExtensionHandler because I've tested bypassing it completely (returning a dummy response from background.js), and when I do, the issue never happens. I've seen this issue posted before:, but without a resolution. SafariWebExtensionHandler.m?: - (void)beginRequestWithExtensionContext:(NSExtensionContext *)context { NSExtensionItem *response = [[NSExtensionItem alloc] init]; response.userInfo = @{ SFExtensionMessageKey: @{ @"op2": @(YES), @"op3": @(YES), @"op4": @(YES), @"op5": @(YES), @"op6":@(YES), @"op1": @(NO) } }; [context completeRequestReturningItems:@[ response ] completionHandler:nil]; } background.js (removed proprietary logic so excuse syntax errors): browser.runtime.onMessage.addListener((request, sender, sendResponse) => { console.log("Received request: ", request); if (request.action === "getUserSettings") { var payload = JSON.stringify({cmd: "getUserSettings"}); sendMessageToNative(payload, async function(response) { sendResponse(response); }); return true; } return true; }); content.js browser.runtime.sendMessage({ action: "getUserSettings" }).then((response) => { ... }); I've worked around this by waiting for a few seconds and then resending the request if I never got a response (and this workaround works!), but this results in a bad UX. So, does anyone have any tips, pointers, etc?
Posted Last updated
.
Post not yet marked as solved
2 Replies
407 Views
I am developing a web application that works on webview. From iOS 13, users could set a specific language for each individual app, and every webview-based application knew the application language through navigator.language. However, in iOS 17.4, this API returns the system language instead of the individual app's language in web applications. Is this an official change in iOS 17.4 or a bug?
Posted
by Hyuncheol.
Last updated
.
Post not yet marked as solved
0 Replies
233 Views
Hello, While developing an extension for Safari using Manifest V3, I encountered an issue where my service worker stops functioning; it simply disappears, and I'm unable to revive it in any way. I've attempted to send messages from popup.js and content.js, and even tried setting an alarm with a 20-second interval. However, the worker remains unresponsive until the browser or the extension is reloaded. The logic of my extension operates through background.js (worker). What steps should I take to restore the functionality of the worker? Thank you for your assistance.
Posted
by Andry-001.
Last updated
.
Post not yet marked as solved
0 Replies
266 Views
Good evening, I am having problems with my WebRTC application when an iPhone or Macbook is connected. This only happens when an iPhone or Macbook is connected, as tests with Windows or Android devices have shown no issues. As can be seen in the screenshot below, it appears that the datachannel is not initialised correctly. In fact, the webcam and microphone do not work even if permissions are given by the user, and messages and the remote webcam are not sent/shown. If I open chrome console on Windows, this is the error I get in the console Could you please help me investigate this problem. If you want, you can have full access to my application at https://www.fourmeet.it. I attach the functions that seem to be responsible for the problems: const configuration = { iceServers: [...turnServers, { urls: 'stun:stun.1und1.de:3478'}], iceTransportPolicy: 'relay' }; peerConection = new RTCPeerConnection(configuration); dataChannel = peerConection.createDataChannel("chat"); peerConection.ondatachannel = (event) => { const dataChannel = event.channel; dataChannel.onopen = () => { console.log("peer connection is ready to receive data channel messages"); }; dataChannel.onmessage = (event) => { console.log("message came from data channel"); const message = JSON.parse(event.data); ui.appendMessage(message); }; }; peerConection.onicecandidate = (event) => { console.log("geeting ice candidates from stun server"); if (event.candidate) { // send our ice candidates to other peer wss.sendDataUsingWebRTCSignaling({ connectedUserSocketId: connectedUserDetails.socketId, type: constants.webRTCSignaling.ICE_CANDIDATE, candidate: event.candidate, }); } }; peerConection.onconnectionstatechange = (event) => { if (peerConection.connectionState === "connected") { console.log("succesfully connected with other peer"); } }; const stringifiedMessage = JSON.stringify(message); if (dataChannel && dataChannel.readyState === 'open') { dataChannel.send(stringifiedMessage); } else { console.log('canale non aperto'); } };
Posted Last updated
.
Post not yet marked as solved
0 Replies
180 Views
Hello, I am currently developing an Angular application. In the application, there are labels containing "Name" above some input fields. If these inputs contain a "Name" label; (I should mention here that this problem is observed not only in the label tag, but also in the span and p tags) I think it suggests the names of the people in the contacts in the input field. If you open up that link in Safari, you can try that behavior. https://stackblitz.com/edit/stackblitz-starters-lvykt2?file=index.html
Posted
by wS2Zth.
Last updated
.
Post not yet marked as solved
0 Replies
211 Views
I have a web site that uses CSS linear-gradient with color-mix for a background of a division. It shows up just fine in Safari on iOS and iPadOS 17.4.1. When do a screenshot, and select "Full Page", the background-image becomes all black and the text in the division is unreadable. Here is an example of what I am doing. div.ugly { background-image: linear-gradient(to right, yellow, color-mix(in srgb, red, blue)); } Any ideas how to get this to not turn black? I've tried using a print media query but the "Full Page" screenshot does not use that. It looks like it might be a bug in iOS/iPadOS. Thanks, Mike
Posted
by MikeyMc.
Last updated
.
Post not yet marked as solved
0 Replies
160 Views
Hi! I've faced with a problem while using input navigation arrows. When I focus the last field and then click on the down arrow - it takes me to the first field in the beginning of the screen
Posted
by babidze.
Last updated
.
Post not yet marked as solved
2 Replies
299 Views
Safari is allowing users to create multiple passkeys despite setting the excludeCredentials in PublicKeyCredentialCreationOptions (https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create#excludecredentials). I also included appidExclude(https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/WebAuthn_extensions#appidexclude) but it was still allowing me to create multiple passkeys on the same iCloud account. This does not happen in other browsers. Can anyone point me to any documentation regarding this? Much appreciated https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/WebAuthn_extensions#appidexclude https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create#excludecredentials
Posted
by ebdev2024.
Last updated
.
Post not yet marked as solved
0 Replies
215 Views
I have a page that needs to display a large PNG image (1024 x 100247 ) Everything works fine in Chrome and Edge, but failed in safari. this is test image : https://storage-staging.passton.jp/images/2024/03/11/E0R6G8FKd3B3iLPO.png is there any limit in safari ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
257 Views
<div class="container" style="background-size: contain; user-select: none; pointer-events: none; height: 787.5px; width: 1400px;"> <div class="container__header">header</div> <span> <div class="video-container" style="inset: 17.853% 68% 11.747% 1%; z-index: 2; opacity: 1;"> <div class="video-container__placeholder-image">image</div> <div class="video-container__content"> <div class="some-info"></div> <div class="video-canvas"></div> <div class="other-info"></div> </div> </div> <div class="video-container" style="inset: 17.853% 1% 11.747% 33%; z-index: 1; opacity: 1;"> <div class="video-container__placeholder-image">image</div> <div class="video-container__content"> <div class="video-canvas"> <div class="player" style="width: 100%; height: 100%; position: relative; overflow: hidden; background-color: black;"> <video playsinline="" muted="" style="object-fit: cover; width: 100%; height: 100%; position: absolute; left: 0px; top: 0px;"></video> </div> </div> </div> </div> </span> </div> The page looks like Then, the html changed as follows, <div class="container" style="background-size: contain; user-select: none; pointer-events: none; height: 787.5px; width: 1400px;"> <div class="container__header">header</div> <span> <div class="video-container" style="inset: 100% 100% 0% 0%; z-index: 2; opacity: 0;"> <div class="video-container__placeholder-image">image</div> <div class="video-container__content"> <div class="some-info"></div> <div class="video-canvas"></div> <div class="other-info"></div> </div> </div> <div class="video-container" style="style="inset: 6.106% 5.98719% 0%; z-index: 3; opacity: 1;""> <div class="video-container__placeholder-image">image</div> <div class="video-container__content"> <div class="video-canvas"> <div class="player" style="width: 100%; height: 100%; position: relative; overflow: hidden; background-color: black;"> <video playsinline="" muted="" style="object-fit: cover; width: 100%; height: 100%; position: absolute; left: 0px; top: 0px;"></video> </div> </div> </div> </div> </span> </div> From the mac developer tools, the width of the video is 1400px, but it render like the size is same as before in iOS17+(iOS17.1 and iOS17.3.1). The expected results looks like the actual results are looks like I tried the same operators in iOS 14.6 and 16.4 and it worked as expected, this problem likes only exists in iOS17+. Please help me to resolve this problom. Thanks.
Posted
by zcl.
Last updated
.
Post not yet marked as solved
0 Replies
323 Views
I'm wondering if there's a way to capture the SSL/TLS key log / ephemeral keys from Safari for troubleshooting like there is for Firefox & Chrome by setting the SSLKEYLOGFILE environment variable. I'm troubleshooting an issue where Safari doesn't load certain CSS and JPEG elements on the first load, but when hitting refresh, those same elements load fine. Clearing the cache or using "disable caches" in the network tab of the inspector will cause the elements to fail to load again. Safari shows that it received a header, but no content. Wireshark shows four TCP/RST packets coming from the client / Safari. The same site loads without issue every time using Firefox or Chromium. I'm hoping that someone knows how to capture the TLS session keys from Safari so I can look deeper into the packet capture and figure out if Safari is incorrectly parsing the server's response or if there is some subtle corruption in the response that Safari rejects, but other browsers accept. So, does anyone know how to capture the raw data transfer or TLS session keys from Safari? Thank you!
Posted Last updated
.
Post not yet marked as solved
0 Replies
312 Views
Since iOS 17.4 when open a camera in Safari, video stop when download popup appear and video doesn't restart expect when go to home menu and reopen Safari This comportment wasn't present before 17.4 To Reproduce : https://zcqqjd.csb.app/ Step 1 : Click on start Camera Step 2 : Click on Download Picture
Posted
by Adrien-M.
Last updated
.
Post not yet marked as solved
0 Replies
264 Views
My organization is using mutual TLS authentication for HTTPS, with PIV cards storing the certs. We observe that some OS X devices send only the leaf certs when establishing the mTLS connection, whereas others send the entire chain. We cannot validate the leaf cert without the intermediate cert, so those clients are rejected. What drives the decision whether to send the whole chain, vs the leaf cert only? For more details, and some things we observed. The PIV cards are US DoD CAC cards: https://www.cac.mil/common-access-card/ The client cert chain on the card looks like this: Leaf client cert, CN=LastName.Name Intermediate cert, CN=DOD ID CA-70 "Root" cert, CN=DoD Root CA 6 through 8.: Additional interoperability certs. Our system is set up to trust the "root" cert CN=DoD Root CA 6. Neither the leaf cert, nor other certs in the chain are trusted by Apple Keychain Trust Store by default. We find that most laptops will send the entire chain, 1 through 8, when establishing the mTLS connection with our servers. This allows us to validate them correctly. On a subset of OS X devices, Google Chrome will only send the leaf chain. This happens even when we use exact same PIV card, and exact same PIV reader as on working laptops. Safari will not send any cert at all. We found that if we explicitly add the CN=DoD Root CA 6 to the Apple Trust Store, Google Chrome and Safari will start sending a short chain, containing only certs 1 through 3. This allows the server to validate them. When we remove it from Trust Store, Chrome is back to sending only leaf, but Safari will not even send the leaf. Again, this only happens on some laptops; on most of the laptops, both Safari and Google Chrome will send the entire chain, regardless of whatever is set up in Trust Store. My suspicion is that for some reason, on those laptops, Safari will not send the client certs that OS X doesn't trust. This makes sense, but this is not the behavior we want. We want the same behavior on the working laptops, which is to send the whole chain. All of our laptops are on OS X 14.4
Posted Last updated
.
Post not yet marked as solved
0 Replies
274 Views
Our app uses Azure B2C for SSO login, and we are noticing a bug on Safari 17.x (any browser on iOS 17.x, and Safari 17 on Mac OS) where the Azure B2C cookies go missing during the registration process, which leads to a broken user experience. The following cookies are the ones that go missing The only forum posts related to this issue I have come across are these: https://techcommunity.microsoft.com/t5/azure/azure-app-on-ios-17-not-working/m-p/3958809 Which links to this https://techcommunity.microsoft.com/t5/intune-customer-success/day-zero-support-for-ios-ipados-17-and-macos-14/ba-p/3930010 Is this in bug that will be fixed in an upcoming release on Safari 17.x?
Posted Last updated
.
Post not yet marked as solved
0 Replies
319 Views
Even when iOS's '"." Shortcut' keyboard setting is enabled, double-tapping the spacebar in WKWebView doesn't insert a period. While making WKWebView editable , "." shortcut is not working. It works fine when any other external keyboard is used. I am facing this issue in WKWebView using apple keyboard. Even forceful adding javascript to replace double tap of space bar to period character logic is not working.
Posted
by Neel95.
Last updated
.
Post not yet marked as solved
0 Replies
328 Views
Hi I am using safari in iPad OS (17.4). when I am checking the user agent, It is showing like Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15 there is no indication that it's from iPad. How would I detect iPad from user agent whereas on IPhone it can easily be detected. Could you please help me here?
Posted Last updated
.
Post not yet marked as solved
0 Replies
277 Views
I use three Macs for development of a web application. On each of the Macs (macOS 14.4) I used mkcert to install a local CA and to issue developer certificates (all separately). Accessing the web app with https://localhost:8080 works fine on two Macs with all browsers, but on one Mac Safari claims to have another root CA for localhost which it does not trust. And I cannot override the trust settings. Using Keychain Access I do not find this certificate. Safari shows it like this: Scrolling down I can see DNS Names localhost, localhost.localdomain and lvl.me, so I suspect it is a leftover from trying to install a root CA before using mkcert. The mkcert certificate looks like this and I can see it in the System keychain: So Safari complains and I cannot tell it to trust the server certificate as the CA does not fit (I think). Firefox and Chrome open the website just fine after warning me and me telling them to do so. I tried to find the wrong CA using Keychain Access and Terminal (security find-certificate -a -c localhost, security find-certificate -a -c lvh...) but in vain. Where can I find this certificate and how can I delete it?
Posted Last updated
.
Post not yet marked as solved
0 Replies
133 Views
I had my website perfectly opening before the iOS 15 update for iPhones. But after that whenever anyone is opening my website it shows blank screen. It is working fine MacBook safari, chrome and all other android devices. Here is the link to the website : [https://startstaging.web.app/PO/1709528483037) I have cleared history, cache, have done resetting the phone, still it hasn't done anything. I don't know how to make it work, do help.
Posted Last updated
.