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

Safari autofill works very strangely
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
0
0
233
Apr ’24
Safari webauthn excludeCredentials
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
2
1
446
Mar ’24
Webview in iOS 17.4.1 performance issue
Hi all, An app that until yesterday would take 1 second to render a list in the WKWebView is now taking over 3 minutes to load. No changes have been made to the app or the content that it is showing. I have tested on a device running 17.3, and performance has been acceptable, and then updated to the latest security fix (17.4.1) and now 3 minutes. Having read the release notes https://support.apple.com/en-us/HT214097 I cant see what would have affected either the processing of javascript or the rendering of content within the web view. My team is currently running all our apps that use a hosted WKWebView within it to ensure that they aren't affected, but this one app is now unusable and safety concern for the users (Airline Safety). Has anyone else experienced this or has a workaround - Sorry there are no logs (I have been scanning the device logs and nothing new is appearing - almost as if the operation is just dead locked).
4
0
1.4k
Apr ’24
IOS17+ safari video size rendering compatibility issue
<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.
0
0
434
Mar ’24
WKWebView loadSimulatedRequest() method
Is there any reference/documentation/discussion about the motivation for including the WKWebView loadSimulatedRequest() method? Is it intended to be used for testing? Page load performance enhancement? I'm wondering if there is a way to leverage its usage in our webview dependent app.
0
0
259
Mar ’24
TestFlight is installing the incorrect version and build of the application.
I have created a new build for my Safari web extension and distrbuted it to test flight. Test Flight says I am using the correct version - but when I go to the Setting > Extensions in Safari and enable it - it still has the old version number. App Store showing the correct version is in testing Test Flight confirming said version number Safari with the incorrect version Any idea what I am doing wrong?
1
0
353
Mar ’24
Inquiry Regarding WebM Video Format Support in Safari
Dear Apple Community, I am writing to seek assistance with a challenge I've encountered regarding the playback of WebM video format in Safari. Despite various attempts and troubleshooting, I've been unable to successfully play WebM videos in Safari using the HTML5 video tag with provided Blob URLs. The videos, which are recorded in WebM format using browsers such as Chrome, fail to play in Safari, causing inconvenience for users who rely on this browser for their browsing needs. I understand that Safari may have certain limitations and compatibility issues with certain multimedia formats, but as WebM gains popularity as a widely used format for web-based videos, its support in Safari would greatly enhance the browsing experience for many users. I'm reaching out to inquire if there are any known solutions, workarounds, or plans to address this issue. Specifically, I've attempted to utilize the HTML5 video tag with Blob URLs to play WebM videos in Safari, but to no avail. If there are alternative methods or techniques that I may have overlooked, I would greatly appreciate any guidance or assistance in enabling playback of WebM videos in Safari. Ensuring cross-browser compatibility and seamless playback of multimedia content is crucial for providing a consistent and enjoyable user experience across different platforms and environments. Any insights or recommendations from the Apple community would be immensely helpful in resolving this issue. Thank you for your attention to this matter, and I look forward to your response. Sincerely, Umair Khan
1
0
1.4k
Mar ’24
WKWebView "showLockdownModeFirstUseMessage" delegate
How exactly am I supposed to implement the following delegate method of WKWebView? func webView(_ webView: WKWebView, showLockdownModeFirstUseMessage message: String, completionHandler: @escaping (WKDialogResult) -> Void) The problem: the delegate method is defined to be available since iOS 13. But "WKDialogResult" in the completion handler is declared to be available since iOS 16. So this is already very odd and probably a bug in the API declaration. When I make the delegate method available since iOS 16 (via @available (iOS 16.0,*)) then Xcode gives me an error stating that this method must be provides for iOS 14 and later. But when it is made available since iOS 14 (or 13), then I get the error that WKDialogResult is only available since iOS 16. So this looks like a big messy bug in the API declaration, or did I miss something here? It would not the first bug in the API declaration of the WKWebView where the availability is wrong (for example the property "upgradeKnownHostsToHTTPS" is declared to available since iOS 14.5, but in reality it is only available since iOS 16 and would crash when used under iOS 14.5)
0
0
223
Mar ’24
audio ios 17.4 webview
Hello, my radio streaming app worked well in iOS 17.2 and earlier but from iOS 17.4 streaming no longer works, what has changed? What do I have to do in my app? import UIKit import WebKit class ViewController: UIViewController, WKNavigationDelegate { @IBOutlet weak var mWebView: WKWebView! private let url: URL = URL(string: "https://mi web")! override func viewDidLoad() { super.viewDidLoad() let configuration = WKWebViewConfiguration() // Configurar preferencias de la página web let preferences = WKPreferences() preferences.javaScriptEnabled = true configuration.preferences = preferences mWebView.navigationDelegate = self mWebView.load(URLRequest(url: url)) } }
0
0
283
Mar ’24
Images not rendering on some iPhones
Hi all, I deployed a static site and two of my imgs are not appearing on some iPhones. It's not showing up on my iPhone 15 Pro but it's appearing on an iPhoneSE and androids. When I long click them, they actually show up in preview and can even open the images in a different tab, so they're just transparent. Does anyone have any idea why this is happening?
1
0
395
Mar ’24
WKWebView iOS: Double-tapping the space bar doesn't insert a period.
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.
0
0
459
Mar ’24
Incorrect UserAgent in iPad OS safari
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?
0
0
562
Mar ’24
PDF Text recognition in WKWebView iOS 16 iOS 17
Problem: Hello! I have some problems with UIEditMenuInteraction in WKWebView which show PDF using PDFKit (as far as I know) - when text is selected, there is no copy/paste buttons on iOS 16.4 or higher. Also I've noticed that selection blue view take less space than actual text is on iOS 17. The problem both cyrillic and latin characters. How I can fix this? p.s. I found on stackoverflow that PDFKit can treat PDF files like images, but on view hierarchy there is no differences between 16 and 17 iOS How it looks: The problem file: https://drive.google.com/file/d/1Tu8RCrlwOI_H3TcwOGFbDR0G9h1OP7MU/view?usp=sharing
0
0
322
Mar ’24
I can't see a property on Safari after add an script on WKWebView
After insert this script I can't see the property window.app.isNative = true on Safari, What I'm missing here? Thanks in advance userContentController.addUserScript(WKUserScript(source: """function() { if (!window.app) { window.app = {}; } window.app.isAndroid = false; window.app.isIOS = true; window.app.isNative = true; originWhitelist={['*']} } """, injectionTime: .atDocumentStart, forMainFrameOnly: true))
0
0
288
Mar ’24