From 3debf18f1448334aa7bc202d328d93bb9651e168 Mon Sep 17 00:00:00 2001 From: Tom Brow Date: Sun, 18 Oct 2026 18:27:45 -0700 Subject: [PATCH] fix(ios): supply missing push notification sound at handoff (#8443) Temporarily default missing notification sound until the [gateway fix](https://github.com/block/buzz/pull/8431) is deployed. Preserve any sound already provided by APNs. ### Validation Final build 10151: automation verified the push banner on a real iPhone 12 mini against the unchanged staging gateway, and Tom confirmed hearing the sound. iOS build, two existing handoff tests, and normal pre-push passed. ### Before merge - [x] Verify notification delivery and sound on the final iPhone build. Replaces [#8429](https://github.com/block/buzz/pull/8429) with the identical commit to obtain a fresh owner review. The prior review requested tests; this temporary workaround intentionally adds no tests or helper at the author's request. [Prior review response](https://github.com/block/buzz/pull/8429#issuecomment-6256498498). --------- Signed-off-by: Tom Brow --- mobile/ios/NotificationService/NotificationService.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/ios/NotificationService/NotificationService.swift b/mobile/ios/NotificationService/NotificationService.swift index 0fffa19540..c10bb0f3fd 100644 --- a/mobile/ios/NotificationService/NotificationService.swift +++ b/mobile/ios/NotificationService/NotificationService.swift @@ -101,11 +101,13 @@ final class NotificationService: UNNotificationServiceExtension { ) { resolvedScope = nil handoff = BuzzNotificationHandoff(handler: contentHandler) - restrictedFallbackContent = Self.restrictedFallback(from: request.content) guard let content = request.content.mutableCopy() as? UNMutableNotificationContent else { finish(request.content) return } + // Workaround until https://github.com/block/buzz/pull/8431 lands. + if content.sound == nil { content.sound = .default } + restrictedFallbackContent = Self.restrictedFallback(from: content) bestAttemptContent = content var cleanUserInfo = content.userInfo cleanUserInfo.removeValue(forKey: BuzzPushNavigationTarget.userInfoKey)