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

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
841
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
7k
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
762
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
487
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
389
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
325
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
490
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
415
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
573
Dec ’24
How to confidently select one type of camera on iOS
We have a web application that uses high resolution images to validate the authenticity of products. For this purpose we want to use the best camera to make the high resolution camera, on iPhone Pro devices this camera is the ultra-wide angle camera. The issue we have is how to confidently select that camera from the list returned by navigator.mediaDevices.enumerateDevices. We can't use the device ID as it change every time (and for every user), we could use the camera name but the string is translate to the device language which is very problematic. We could also just select a specific item in the list but we are not sure that the order is preserved and it makes it hard to deal with other iPhone models that don't have that ultra wide angle camera. Selecting a specific camera looks like an essential feature not only for us. What is the best option, we are looking for something that is future proof and easily scalable.
0
0
389
Dec ’24
Public Contact Info
I wanted to create a public contact card so when my clients click a button on my website it traverses them through the iMessage API and instantly adds a contact card with photo and name as a background task. If there is implications my next question was going to be if there is a possible way to create a public contact card where for example I could redirect a client to iMessage and when starting a new conversation if they type in a name it pops up instead of needing to utilize a phone number? I am trying to explain my thought process as much as possible but I have been typing for hours. In simple terms is there a possibility to create a public contact card that can be accessed or texted by anyone who types in a name into new conversation bar?
1
0
495
Dec ’24
MacOS's Safari use a lot of cpu on some js web page using requestAnimationFrame then chrome
It's being a very long time that I discovery that in some web pages, that use function requestAnimationFrame will cause a lot of cpu, but very little in Chrome. I have already submitted this bug nearly two years ago without printout requestAnimationFrame, no one replied. I submitted again and mention requestAnimationFrame recently, hope there will be some response. If anyone interested in this issue and know some tech in javascript please help. You can enter https://www.baidu.com/ and click one of the topic in all the 百度热搜 which have 弹幕滚动(using requestAnimationFrame, and cause a lot of cpu usage) on right.
2
0
602
Dec ’24
iOS 18.2 Safari does not terminate the download thread after partial file downloads are completed
When I download specific files (not limited to a single website), even if I find that the downloaded file size matches the original file size and the downloaded file size no longer changes, Safari still does not stop the download thread, but continues to wait indefinitely. This results in the Safari not terminating the download thread even after the file download is completed, making it impossible to complete the download; The file has not been landed and cannot be obtained. This prevents me from downloading some files. Please fix this problem. In addition, I found that in iOS 18.2, during the process of downloading files on Safari, the synchronization and backup flags appear in the upper right corner of the notification bar. I am not sure if this is an unexpected behavior, but the flag still lingers for a long time after manually canceling the download thread. (the download thread is waiting indefinitely) Feedback Number: [FB16124044]
Topic: Safari & Web SubTopic: General Tags:
1
3
1.1k
Dec ’24
WebSocket Connection Fails in Safari iOS 18.1+ when triggered from an iframe
Hello, I’m encountering a problem with WebSocket connections in Safari on iOS 18.1 and later when initiated from an iframe. The same implementation works perfectly in other browsers like Chrome but fails in Safari. In Safari, the WebSocket connection fails with error message "WebSocket connection to 'wss://MY_CONNECTION_URL' failed: The internet connection appears to be offline." Has anyone else faced this? Is this a known limitation or bug in Safari? Any workarounds or solutions would be greatly appreciated. Thank you!
1
0
979
Dec ’24
Not displaying some websites properly after iOS 18.2
After the iOS 18.2 update, I can no longer see the some website as I could see it on the desktop. ( for example Jeostok . Com)I have tried this in many browsers. For example, I get the same result in browsers such as Safari Chrome Firefox opera and edge. The home page is not displayed properly. It was displaying properly before the update and now it is not displaying properly. This website is my website. I frankly do not know how to solve this problem, if anyone knows, I am waiting for your help.
3
0
1k
Dec ’24
Help with Device Orientation Permission on iPhone (iOS 18) in Safari
Hi everyone, I'm facing an issue with accessing device orientation and motion events in Safari on my iPhone (iOS 18). Despite trying several guides and solutions, I cannot find the option to allow access to motion and orientation for websites in the browser settings. I’ve checked privacy settings, and the device is up to date. Can anyone guide me on how to enable this feature in Safari or share any workarounds? Thanks in advance!
0
0
594
Dec ’24
Safari 18.2 repeats Authorization header when it reloads
Safari 18.2 on Sequoia 15.2 sends repeated Authorization header when iCloud Relay is enabled and the page is reloaded. Inside Safari Preferences -> Privacy -> Hide IP address -> from Trackers and Websites (ensure this is enabled) Visit a website that uses HTTP Authorization and authenticate oneself Reload website a couple of times and it will result in an HTTP 400 error due to repeat Authorization header sent by Safari
Topic: Safari & Web SubTopic: General Tags:
2
2
533
Dec ’24
Inquiry about WebRTC camera access when using Chrome browser and WKWebView API on iPadOS
We are Java application developers and we have a question regarding camera access via WebRTC on iPadOS. Specifically, on iPadOS 17.1, we are encountering an issue when trying to access the camera via the WKWebView API in the Chrome browser, where an error occurs and the camera capture fails. Our investigation suggests that device access through the navigator.mediaDevices property via the WKWebView API may not work in Chrome. However, it works as expected in the Safari browser, leading us to wonder if this is a Chrome-specific limitation, or if it's due to an iPadOS setting or specification. At this point, we are unsure if this issue is related to the WKWebView and WebRTC specifications on iPadOS 17.1, or if there are specific limitations in Chrome. We would appreciate any insights or solutions regarding camera access in iPadOS 17.1 with WKWebView and WebRTC, especially in relation to Chrome.
Topic: Safari & Web SubTopic: General Tags:
1
0
513
Dec ’24
IOS 18.1 wkwebview bug issue
The web page image is not fully displayed, only part of it is rendered. Switch the app to the background and then to the foreground, and the incomplete image will be rendered correctly again.
Topic: Safari & Web SubTopic: General
1
0
459
Dec ’24