From a0ac8ace89b15790ac82940cc5f1c27bf31a119f Mon Sep 17 00:00:00 2001 From: ih-codes Date: Mon, 15 Dec 2025 11:38:24 -0600 Subject: [PATCH] Annotate the `PingUploadScheduler` as unavailable for iOS App extensions, as app extensions run in a restricted environment without access to `UIApplication.shared`. --- glean-core/ios/Glean/Net/PingUploadScheduler.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glean-core/ios/Glean/Net/PingUploadScheduler.swift b/glean-core/ios/Glean/Net/PingUploadScheduler.swift index cd5879d364..5c450643f0 100644 --- a/glean-core/ios/Glean/Net/PingUploadScheduler.swift +++ b/glean-core/ios/Glean/Net/PingUploadScheduler.swift @@ -26,6 +26,10 @@ func startUploader() { /// uploader specified in the Glean `Configuration`. /// /// This will typically be invoked by the appropriate scheduling mechanism to trigger uploading a ping to the server. +/// +/// Note: The use of `UIApplication.shared` is not permitted in app extensions because app extensions run in a +/// restricted environment and cannot access the `UIApplication`. +@available(iOSApplicationExtension, unavailable) public class PingUploadScheduler { let httpUploader: PingUploader let httpEndpoint: String