Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.

General Documentation

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Style issues with Safari
I'm embedding a page into an APP developed with Xcode through WKWebView, but I've encountered style issues with the page rendered by WKWebView. I simplify the problem as follows. Open this link with Safari: https://cofficlab.github.io/JuiceEditor-Playground What is the light blue part? How can it be removed? If this is a feature, what is the name? Chrome doesn't have this problem.
Topic: Safari & Web SubTopic: General
3
0
401
Dec ’24
input type="file"でアップロードした画像のGPS情報
input type="file"でアップロードした画像データからGPS情報が除去されます。 こちらはiPadOS16.5.1で発生しておりました。 iPadOS17.4.1、iPadOS18.3では正常にGPS情報が保持されます。 iOS、iPadOSのアップデートでGPS情報を保持するよう修正されたと見受けられますが、リリースノートを参照しても上記修正についての記事を見つけられませんでした。 お手数ですが、上記修正に該当する記事をご教示頂けませんでしょうか。 どうぞよろしくお願い致します。
0
0
363
Feb ’25
Open Graph Metadata & SSL Issue on iOS/macOS
Hi Team, We’re encountering an issue where Open Graph metadata (e.g., og:image) isn’t rendering properly on iOS/macOS platforms or WhatsApp previews. Here’s a brief summary of the problem: SSL Configuration: Our SSL Labs report shows a grade of B due to: Improper certificate chain setup. Outdated cipher suites (e.g., TLS_RSA_WITH_3DES). Support for deprecated TLS protocols (1.0/1.1). Frontend Observations: Metadata (e.g., og:image) is not reliably picked up on iOS/macOS crawlers. Crawlers may have issues accessing assets due to CORS or TLS limitations. What We Need: Guidance on resolving Open Graph preview issues specific to iOS/macOS environments. Best practices for ensuring compatibility with Apple’s crawlers and WhatsApp on iOS. Suggestions for optimizing server-side SSL/TLS configurations and frontend setup to improve metadata visibility. We’re currently using Next.js 14 for the frontend. Any insights or debugging tips are greatly appreciated! Thanks in advance!
1
0
448
Dec ’24
WKWebView occasionally shows white screen and persists until app restart
I am encountering an intermittent issue with WKWebView in my iOS app. The problem occurs infrequently, but when it does, the WKWebView consistently displays a white screen and remains in this state until the app is forcefully terminated and relaunched. To provide more context, here are the key characteristics of the issue: The white screen problem occurs sporadically and is not easily reproducible. The WKWebView remains unresponsive despite attempts to interact with it. Reloading the webpage or navigating to a different URL does not resolve the white screen issue. The problem persists until the app is terminated and relaunched. This issue is specific to the WKWebView; other components of the app function correctly. The WKWebView renders normally, and the main document synchronously loads resources both offline and online without any issues. The bridge and JavaScript execution also work as expected. However, when interacting with the WKWebView, it becomes unresponsive to user clicks, and the web inspector fails to respond. Additionally, asynchronous network requests also do not receive any response. The problem occurs exclusively on HTTPS pages, whereas HTTP pages load without any issues. Other components, such as workers, function correctly. addUserScript injection during WKWebView creation is effective, and evaluateJavaScript during the page loading process works as expected. However, when the document becomes unresponsive, executing evaluateJavaScript only triggers the callback after the WKWebView is destroyed. I have discovered a reliable method to reproduce the white screen issue in WKWebView. This method involves the following steps and conditions: Create a WKWebView instance. Load an HTML page using the loadRequest method(https url request). Before the WKWebView is attached to the UI (not yet visible to the user), call the evaluateJavaScript function. This issue has occurred in almost all iOS versions, including the latest iOS 17.x version.
4
0
1.5k
Mar ’25
Safari no connection
Upon upgrading to 18.3 safari now says no connection cleared cookies and data. Disabled all extensions and all von and security anyone else having this issue
Topic: Safari & Web SubTopic: General
0
0
209
Jan ’25
Local storage/db of WKWebView in App Clips and installed Apps
Hello, I am studying a possible scenario. Let's say I create an App Clip that features a WKWebView. The WKWebView hosts a sort of webapp that uses local storage and IndexDB. When the complete app is installed, are the data persisted so the WKWebView of the complete app finds them as it was reading them before? Are the data transferred by the operating system to a new location but still accessed the same way by the WKWebView (Or even the location is the same because it is the WKWebView special storage)? Or are they wiped out? Thank you in advance Best regards
0
0
428
Jan ’25
Camara preview High probability failed on iOS17.5
When using WKWebview to load the following url on iOS17.5, The Camara preview page is likely to not display the image, but there is no error report. The video cannot be loaded. There is no problem with iOS17 and iOS18. I can't find the cause of the error, How to avoid this problem? I hope you can provide some suggestions. I want a way to avoid the error,Thanks STEPS TO REPRODUCE Run iOSTest.xcodeproj on iOS17.5 Tap WKWebview(Camara) Waiting webview load url tap 手持设备训练 立即开始 download demo https://github.com/xuty/Report22/raw/refs/heads/main/iOSTest_1_url.zip
Topic: Safari & Web SubTopic: General
0
0
250
Jan ’25
Why does ReactPlayer fail to play videos at 3x speed only on iOS Safari?
I'm encountering an issue with ReactPlayer where videos fail to play when the playback rate is set to 3x, but this problem only occurs on iOS. The same functionality works perfectly fine on Android devices and desktop browsers like Chrome and Firefox. Here are the details of my setup: ReactPlayer version: 2.16.0 Video format: [MP4, hls ] Tested devices: iPhone 13 Expected behavior: Videos should play smoothly at 3x speed. Actual behavior: Videos fail to load or play when playbackRate is set to 3.0. I've read that iOS Safari might have limitations regarding playback rate due to performance or energy efficiency, but I couldn't find any official documentation to confirm this. If anyone has faced a similar issue or knows the root cause (or a workaround), I'd really appreciate your insights. Additionally, if there are official resources or documentation about playback rate limitations on iOS Safari, please share them. Thanks in advance for your help!
Topic: Safari & Web SubTopic: General
0
0
270
Jan ’25
Where to find possible ApplePayFeatures
Using the PaymentRequestAPI, I see this request element listed, but I can't find any description what these features could be: sequence <ApplePayFeature> features; https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrequestbase https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrequestbase/4224914-features
0
0
342
Jan ’25
declarativeNetRequest.getMatchedRules() does not return the blocked URLs of the current website until refreshed
We used declarativeNetRequest.getMatchedRules() to retrieve the blocked URLs. While we do receive a list, we noticed that the URLs captured do not always reflect the ones the content blocker is actively blocking at that moment. However, upon reloading the same page, the correct URLs appear. Screenshots are attached for your reference. First load: After reload:
2
0
584
Oct ’24
Safari - cookie setting default behavior in iOS 18
Hello! I have a question about changes in default behavior of Safari related to cookie setting. We had an issue - our Single Sign On login was not working, because of lost cookie on some step of the flow. Only changes in Safari cross-website tracking settings helped to fix the issue So the question is - are there any official documentation about changes in cookie setting policy in Safari on iOS 18?
Topic: Safari & Web SubTopic: General Tags:
0
0
378
Oct ’24
macOS customized shortcut for Safari with menu title "ReTab" doesn't trigger the extension
Hello! I've made a Safari extension that supports command "ReTab", and a couple of month ago, adding a customized macOS shortcut for Safari with menu title "ReTab" did trigger the extension. However, it's not working anymore and I'm not sure if it's from macOS/Safari update or because I changed manifest from v2 to v3 - could you help check if there's anything wrong with either the manifest.json or background.js? (the default Cmd+E still works) Thank you in advance! Xun manifest.json: { "manifest_version": 3, "default_locale": "en", "name": "ReTab", "description": "Go to the last active tab with Cmd+E!", "version": "1.4", "homepage_url": "https://LycheeIsle.com", "background": { "service_worker": "background.js" }, "action": { "default_icon": "images/toolbar-icon.svg" }, "permissions": [ "commands", "tabs", "storage" ], "commands": { "ReTab": { "suggested_key": { "default": "Command+E" }, "description": "Go to the last active tab" } }, "options_page": "options.html" } in background.js, I have this line which should listen to the command, and Cmd+E works but any customized shortcut for "ReTab" in Safari doesn't: browser.commands.onCommand.addListener(async (command) => { if (command === "ReTab" || command === "retab") { await retab() } });
1
0
323
Feb ’25
PWA and webpush notification
hi anybody have issue about pwa and webpush notification using FCM? with latest webpush and ios 17.x or 18.x 1-2 notification arrived but if iphone will be standby or webapp closed the service worker not receive notification
Topic: Safari & Web SubTopic: General
0
0
295
Oct ’24
How is WebAuthn conditional credential creation supposed to work
I'm trying to implement WebAuthn conditional credential creation but I'm not able to get it to work. From this video https://www.youtube.com/watch?v=p8a6ODX1zHY I understand I should call navigator.credentials.create with "mediation: conditional" but the explainer at https://github.com/w3c/webauthn/wiki/Explainer:-Conditional-Registration-Extension also mentions a call to navigator.credentials.get with "mediation: conditional" and "extensions: { conditionalCreate: true }". The explainer seems to suggest they should be called both but for me, both calls never resolve with a credential or an error. What am I doing wrong?
1
0
487
Dec ’24
Crashing in WKWebview Often, when the video is loaded in the webview using an HTML file
Hello, Team. We used WKWebView for our project. We loaded the HTML file into the webview and added the following configuration. weak var webView: WKWebView! func configWebView() { let webViewConfig = WKWebViewConfiguration() let controller = WKUserContentController() controller.add(self, name: "sometest") webViewConfig.userContentController = controller webViewConfig.processPool = WKProcessPool() webViewConfig.setValue(true, forKey: "allowUniversalAccessFromFileURLs") webViewConfig.mediaTypesRequiringUserActionForPlayback = [] let webpagePreferences = WKWebpagePreferences() webpagePreferences.allowsContentJavaScript = true webViewConfig.defaultWebpagePreferences = webpagePreferences webViewConfig.websiteDataStore = WKWebsiteDataStore.default() webView = WKWebView(frame: .zero, configuration: webViewConfig) webView.navigationDelegate = self webView.uiDelegate = self webView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(webView) NSLayoutConstraint.activate([ webView.topAnchor.constraint(equalTo: view.topAnchor), webView.bottomAnchor.constraint(equalTo: view.bottomAnchor), webView.leadingAnchor.constraint(equalTo: view.leadingAnchor), webView.trailingAnchor.constraint(equalTo: view.trailingAnchor) ]) loadWebView() } func loadWebView() { guard let documentsDirectoryURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { return } let contentFolderURL = documentsDirectoryURL.appendingPathComponent("content") let assetFolderURL = contentFolderURL.appendingPathComponent(interactiveGUID) if FileManager.default.fileExists(atPath: assetFolderURL.path) { let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! let documentsURL = URL(fileURLWithPath: documentsPath) let fileToLoadPath = (documentsPath as NSString).appendingPathComponent("content/index_p.html") let fileURL = URL(fileURLWithPath: fileToLoadPath) autoreleasepool { DispatchQueue.main.async { [weak self] in guard let self = self else { return } self.webView.loadFileURL(fileURL, allowingReadAccessTo: documentsURL) } } } We are experiencing webview crashes when loading an HTML file. What happened when I loaded the video file? It automatically looped. Webview frequently crashes when the HTM/JS file is loaded. When a webview crashes, the delegate method usually calls webViewWebContentProcessDidTerminate. This method calls webview.reload(). Also we are clear and cache/ deallocate eveything when i initialized those configuration mentioned as the above. Can you suggest a solution to this? Why is webview crashing? Thank you.
0
0
523
Nov ’24
Using SF Pro for a shop website.
Hello! I am looking to use SF Pro as the main font of my website. This website is used as a place of purchase for some of my products, none of which will actually be using this font. The websites logo will also not be using this font, however I am worried that may be legally unviable. Please let me know if this is an option. I'm not looking to get direct financial gain by using your fonts, just would like to use it for the website. Thank you for your help.
1
0
720
Jan ’25
LocalOverride Request regular expression broke dev tools
Hello, I'm using Safari 18.2 on Sonoma 14.6.1. I was using the Developer Tools to do a Local Request Override in the Source tab for a CSS file that had a changing query string. I thought I had a good regular expression to catch all variants, but apparently it was too generic and possibly wrong, and made both Source and Network tabs no longer work in my Safari. The regular expression I entered for the Local Request Override was: //build/style.css(?.*)?$ Now my dev tools is broken to the extent that the Source and Network tabs no longer work. The slide-out panel on Source that shows Breakpoints, LocalOverrides, etc no longer shows. The toggle for it does, but does nothing now. UI in general looks a little wack on both tabs. So, since I can't turn off the Local Request Override, I've been trying to locate where Safari may have stored it to manually delete it. Not having a lot of luck on that front. It seems to me that Safari was unable to escape my regular expression correctly and it then causes additional issue. Just a guess though. Any advice or help in getting Safari Source & Network working again / manual removal of the LocalOverride would be greatly appreciated. I'm fluent in OSX and Linux, but grep was not much help surfacing anything that worked. Thanks in Advance, possibly a Safari bug as well.
1
0
394
Jun ’25
webpush
hi anybody can help me with webpush fcm? after some hours and pwa closed the webpush notification doesn't arrive until i re-open webapp and recreate a new token
Topic: Safari & Web SubTopic: General Tags:
0
0
306
Nov ’24