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

All subtopics
Posts under Safari & Web topic

Post

Replies

Boosts

Views

Activity

Where can I find the new safari docs?
I am working on some open source documentation genereator tools which should support pwa on apple. I want to check whether some private apple meta tags are still supported like apple-touch-icon, I can only found some archived docs: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html I searched for almost an hour but I can not find anything related to safari and it's behavior in the new documentation. So I want to ask: do I miss anything? or apple is dropping docs for safari?
Topic: Safari & Web SubTopic: General
0
0
303
Dec ’24
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
458
Dec ’24
Unable to Disable/Hide Writing Tools in iOS 18
Hi everyone, I’m working on an app that uses WKWebView. Due to security concerns, our customers want the app to disable copy-paste functionality and similar options (such as Lookup and Share, allowing users to extract text from the app or save it as a file. I was able to disable copy-paste and remove UIMenu options like Lookup and Share. Everything worked fine until the iOS 18.1 beta, which introduced a new menu called Writing Tools (Apple Intelligence) that has its own copy and share buttons I've tried several ways to remove it Remove all UIMenu items using canPerformAction, and it works for all menus but Writing Tools, which still remains override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { return false } Remove it from UIMenuBuilder override func buildMenu(with builder: UIMenuBuilder) { builder.remove(menu: .lookup) builder.remove(menu: .share) } But unfortunately, UIMenuBuilder does not have an identifier for Writing Tools, and it seems like there are no API changes from Xcode 15 to Xcode 16 (https://developer.apple.com/documentation/uikit/uimenu/identifier) It seems like the only way to disable it through MDM configuration (key: allowWritingTools), but we don't use MDM https://developer.apple.com/documentation/devicemanagement/restrictions Environment iOS Version: iOS 18.1 beta4 Device: iPhone 15 Pro App platform: iOS Xcode version: 16.0 MacOS: 15.0 Thank you
11
0
2.6k
Dec ’24
XSRF-TOKEN can not be set in Safari 17.0 over IPv6
Hi, When we using Safari on MacOS with IPv6 we found that the XSRF-TOKEN can be set into the cookies. We have set-cookie in the authentication response headers 'Set-Cookie: XSRF-TOKEN=*******; SameSite=Strict; Secure'. It works by using Safari with IPv4. And also works with Chrome/FireFox with IPv4/IPv6. And also worked with Safari 15.6.1 over IPv6. May I know if this an issue or by design? Anyone aware of this? Thanks.
0
0
376
Dec ’24
navigator.mediaDevices.getUserMedia() Report an error
When using WKWebview to load the following html on iOS17.5 Simulator, navigator.mediaDevices.getUserMedia reports an error (A MediaStreamTrack ended due to a capture failure), but the then branch can be executed. The video cannot be loaded. There is no problem with iOS17 Simulator and iOS18 Simulator. Thank you very much for answering the question. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, viewport-fit=cover"> <title>WebKit Camera Preview</title> </head> <body> <div id="content" style="margin-top:env(safe-area-inset-top);background-color:blue"> <button style="width:200;height:40px;" onclick="doClick()">open camara</button> </div> <video playsinline id="myVideo" ></video> <script> var ggstream = null function doClick(){ const content = document.getElementById("content") content.style.backgroundColor = "red" navigator.mediaDevices.getUserMedia({ video : true}) .then(stream => { const video = document.getElementById('myVideo'); video.srcObject = stream; video.play() }) .catch(err => { console.error('Error accessing media devices.', err); }); } </script> </body> </html>
Topic: Safari & Web SubTopic: General
1
0
516
Dec ’24
LocalStorage sometimes disappears in WKWebView
I am currently publishing an application that uses WebView, I am currently publishing an application that uses WebView, but I am having trouble with data in LocalStorage sometimes disappearing. The website displayed in WebView is made with PHP, By writing the following code in JavaScript, When WKWebView is opened, localStorage is saved and retrieved. window.localStorage.setItem('isAlreadyAgree', true); window.localStorage.getItem('isAlreadyAgree'); The problem is that sometimes this getItem does not get the data. ・This is not reproducible and does not always occur when some process is performed. ・Is it possible that the storage of the application is cleared due to distribution using MDM? ・Is it possible to store too much data in UserDefault, which would cause the LocalStorage space to be overwhelmed and disappear? I would appreciate any hints you can give me. Thank you in advance.
0
0
468
Dec ’24
Web application using Rafael JS crashes on Safari and Chrome after updating to iOS 18.2
After updating my phone to iOS 18.2 2 days ago, I noticed that a website I'm working on that uses Rafael JS(https://dmitrybaranovskiy.github.io/raphael) to do some svg rendering which used to work before I updated just stopped working. I notice that Safari tries to load website tries to load 2 or 3 times before showing the error: A problem repeatedly occurred on <website> which I find really odd since this used to work before and I haven't made any changes to the code. This also happens in Chrome on iOS 18.2.
2
0
616
Dec ’24
A problem repeatedly occurred on website
We are having an issue on our website whilst using Iphones. A soon as the page loads it crashes and the it seems A problem repeatedly occurred to display page. This has been happening lately. This is the link. Can someone tell us what could be the issue? https://www.showshappening.com/TheTravellers/Travellers-Concert-2024 Thanks
Topic: Safari & Web SubTopic: General
1
0
482
Dec ’24
PWA Web Push not arriving on iOS 18.0 - solved
Update: turns out the testphone with iOS 18 was set to 'Do not disturb'. Case closed. Hi all, I created a progressive web app. I is hosted on an actual live domain, served over https. When installed on an iPhone homescreen on iOS 17.7.2, sending web push notifications works fine: the response from the push service endpoint has a status code of 201, indicating all is good. In the service worker of the PWA, an eventlistener for the 'push' event is trigggered and displays an OS notification. On iOS18.0 however, even though the response from the push service endpoint has a status code of 201, there is no notification showing. Even though permission has been granted, and registration.pushManager.subscribe() is successful. When working locally, I've setup my server to run on localhost in https mode as well by following this excellent Technical Note to setup my own Certificate Authority, have it be trusted by my iOS test devices and have the CA issue a certificate so TLS can be set up. On this locally running https server, web push notifications do arrive for iOS 17.7.2, but also not for iOS18.0. I'm not sure how to start debugging this, as I can't seem to get the webinspector to show for the service worker most times, and when I can, there is no console.log() output visible. This still stands: So really, I'm looking for a (reliable) way to be able to debug this issues in safari, or find some documentation on what changed for Safari on iOS 18 that requires changes. Any help or thoughts on this matter?
1
0
865
Dec ’24
SFSafariViewController not loading web pages on Xcode 16 Simulator with iOS 18
After updating Xcode to the latest version we observed that SFSafariViewController is not loading web pages on Xcode 16 Simulator with iOS 18, whenever it is presented the View Controller is empty (does not load any content) and the app freezes, but other screens that use WKWebView are working normally. Also, during tests on physical devices with iOS 18 it seems to work just fine, so it might be just a IDE version problem. Is anyone experiencing the same issue? If so, did anyone find a solution for it?
15
17
7.2k
Dec ’24
WebGPU Enabled but WKWebView doesn't have GPU Access
We enabled WebGPU feature flag on Safari on iOS 18.2. This does give Safari an access to GPU but WKWebView still doesn't have GPU access. Can WKWebView not access GPU through Safari feature flag? Is there some other mechanism through which we can enable GPU access for WKWebView? We are testing gpu access by loading : https://webgpureport.org/ Regards Saalis Umer Microsoft Safari Feature Flag - webgpu = true Safari GPU Access: WKWebView GPU Access:
1
3
790
Dec ’24
Determining If a User's Device is capable of supporting an Apple Wallet Pass
We are developing an Add To Wallet flow on our website where we add the "Add To Wallet" button to a user portal for them to be able to add a loyalty card pass to their Apple Wallet. In other projects with Apple Pay, we can check whether or not the browser supports the JS library by checking if it exists on the global window property (if (window.ApplePaySession) { //do stuff } Is there an equivalent to determine if the user's device is capable of accepting a Wallet pass?
Topic: Safari & Web SubTopic: General Tags:
1
0
497
Dec ’24
JavaScriptCore crash
There is something wrong with WKWebView. it crash. that: - (void)viewDidLoad { [super viewDidLoad]; [self.wkwebView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id _Nullable result, NSError * _Nullable error) { }]; } crash info ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Incident Identifier: 2430792E-CF51-4EF1-94CF-EC72AC601B2C CrashReporter Key: 50bcb858d8f2af8c94fc75188b8a740c78e148ff Hardware Model: iPhone11,6 Process: Youkui4Phone [956] Path: /private/var/containers/Bundle/Application/198201AE-A0DE-4E8F-B84A-2209122A5783/Youkui4Phone.app/Youkui4Phone Identifier: com.youku.YouKu.InHouse Version: 11.1.13.8339 (2042174090) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.youku.YouKu.InHouse [600] Date/Time: 2024-12-17 16:11:51.5863 +0800 Launch Time: 2024-12-17 15:47:19.4488 +0800 OS Version: iPhone OS 18.1.1 (22B91) Release Type: User Baseband Version: 7.00.00 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: FRONTBOARD 2343432205 <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: app<com.youku.YouKu.InHouse(EEEC9FA9-AFA2-4648-B178-EFFB7C9FE91D)>:956 exhausted real (wall clock) time allowance of 10.00 seconds ProcessVisibility: Foreground ProcessState: Running WatchdogEvent: scene-update WatchdogVisibility: Foreground WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 13.120 (user 13.120, system 0.000), 22% CPU", "Elapsed application CPU time (seconds): 2.732, 4% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive> Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x1e503ff90 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x21d17aa50 _pthread_cond_wait + 1204 2 JavaScriptCore 0x1ab495ce8 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1900 3 JavaScriptCore 0x1ab4852e4 WTF::LockAlgorithm<unsigned char, (unsigned char)1, (unsigned char)2, WTF::EmptyLockHooks<unsigned char>>::lockSlow(WTF::Atomic<unsigned char>&) + 216 4 JavaScriptCore 0x1ac413cc0 JSC::JSLock::lock() + 568 5 JavaScriptCore 0x1ac45d0f0 JSC::JSRunLoopTimer::Manager::timerDidFireCallback() + 808 6 JavaScriptCore 0x1ab49e218 WTF::RunLoop::TimerBase::start(WTF::Seconds, bool)::$_0::__invoke(__CFRunLoopTimer*, void*) + 96 7 CoreFoundation 0x194cda894 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 8 CoreFoundation 0x194cda538 __CFRunLoopDoTimer + 1012 9 CoreFoundation 0x194cda08c __CFRunLoopDoTimers + 288 10 CoreFoundation 0x194c793b4 __CFRunLoopRun + 1856 11 CoreFoundation 0x194c78830 CFRunLoopRunSpecific + 588 12 GraphicsServices 0x1e0c581c4 GSEventRunModal + 164 13 UIKitCore 0x1977deeb0 -[UIApplication _run] + 816 14 UIKitCore 0x19788d5b4 UIApplicationMain + 340 15 Youkui4Phone 0x105160fcc main + 56 16 dyld 0x1ba666ec8 start + 2724
Topic: Safari & Web SubTopic: General
1
0
402
Dec ’24
Safari Extension Permissions Lost After Developer Account Transfer
Hi everyone, I’m working on a Safari browser extension and recently encountered a major issue after transferring the extension from one Apple Developer account to another, then releasing an update under the new account. Following this update, user engagement has dropped off dramatically. My understanding—based on my own investigations, which may be limited—is that this problem arises because Safari is treating the extension as entirely new due to the change in the developer account. Here’s what I’ve pieced together so far: • Safari appears to rely on an Extensions.plist file, which uniquely identifies each installed extension by a combination of its bundle identifier and the associated developer account ID. • The Extensions.plist file also stores the state of granted permissions for each extension. Because our extension now has a new developer account ID, Safari no longer seems to recognize it as the same extension that users had previously approved. • As a result, previously granted permissions appear to have been lost, and users must manually re-enable the extension—leading to a significant drop in engagement and revenue. I’m hoping someone can clarify the following: Is there a known migration path to transfer an extension between developer accounts without causing users to lose their previously granted permissions? Are there best practices, or workarounds, for maintaining continuity when the bundle identifier and/or developer account ID changes? Are there any tools for re-linking permissions after a bundle identifier or developer account ID change? Has anyone worked through a similar scenario and found a solution or guidance from Apple Developer Support or the Safari team? I’ll also be reaching out to Apple Developer Support directly, but any insights from those who’ve dealt with this scenario would be greatly appreciated. Thank you!
Topic: Safari & Web SubTopic: General
1
0
333
Dec ’24
Nested USDZs new behaviour with Quick Look
Hello there I have a nested USDZ file I had created a long time ago with some make-up products. Its behaviour was always the same in the past: nested usdz files allow you to control each object "nested" separately. So I used this as a way to allow people to play around with a "set of objects". Today I went to try it and since I'm on ios 18 it shows an "assets tab" on the bottom that allows me to see all the assets inside the tab but doesn't allow me to see or anchor them at all! What changes do I need to do in order for this to work and where can I check documentation on these new behaviours for USDZ files? And what will this allow for in the future? Thank you in advance
0
1
507
Dec ’24
WebRtc video not displayed in safari
Hi, I have implement a WebRtc cameras server: IP camera -> ffmpeg -> WebRtc -> browser The video codec used is H264. I test it on a MAC mini using safari browser (latest version) The Rtc peer connection is correctly connect but the video is not display. looking for the event on the video control, I got this: loadstart progress suspend On the MAC, I have also a chrome browser installed and trying the same, it works fine, I got this: loadstart progress loadmetadata loadeddata canplay canplaythrough playing the video control on the html page is declared like this: Does anyone have an idea why the video stay suspend or have a clue or tips to make it work? Thanks in advance
Topic: Safari & Web SubTopic: General
0
0
449
Dec ’24
Speech synthesis from Safari app extension
I'm making a Safari extension for learning languages. I need speech synthesis for any language the user chooses to learn. I initially tried to make this work within JavaScript, but Safari 18 doesn't reliably list voices for all languages on the web SpeechSynthesis API as described here: https://stackoverflow.com/questions/79179072/how-do-you-use-a-japanese-voice-with-speechsynthesis-in-safari-ios-18 As a workaround, I've had to use AVSpeechSynthesizer in SafariWebExtensionHandler (NSExtensionRequestHandling implementation for the extension). This works in the simulator but not on a real device. I've found this note from Apple in a StackOverflow reply: "Safari extensions are very short-lived, hence not fit for audio playback or speech synthesis. Not being able to validate an app extension in Xcode with a manually-added plist entry for background audio is the designed behavior. The general recommendation is to synthesize speech using JavaScript in conjunction with the Web Speech API." Unfortunately, the suggestion to use the Web Speech API is unsuitable as I just explained. Is there a way to set up a background process in the host app that can do speech synthesis? The app extension would need a way to communicate with this process, and start it if it's not running. Is that possible?
0
0
588
Dec ’24