[push-deeplink-routing-contract] Generalize push tap routing to DeepLinkDestination
Replace order_status-only NotificationCenter path with a single DeepLinkDestination enum + PushDeepLinkParser, decoded once in PushNotificationCoordinator and dispatched via ContentView.route(to:). Also fixes NotificationService reading userInfo["image"] instead of the guide's stale "imageUrl" key.
This commit is contained in:
@@ -2,7 +2,9 @@ import UserNotifications
|
||||
|
||||
/// Rich (image) push — see docs/api/push-notifications-integration-guide.md §4.3.
|
||||
/// Only fires when Atomenta's push payload sets `"mutable-content": 1`, which
|
||||
/// it does by default on any push carrying an `imageUrl`.
|
||||
/// it does by default on any push carrying an image (real wire key is
|
||||
/// `"image"`, not the guide's `"imageUrl"` — verified against
|
||||
/// `PushNotificationService.dispatchApns`/`dispatchApnsMany` in Atomenta).
|
||||
/// `@unchecked Sendable`: the extension process only ever runs one
|
||||
/// `didReceive`/`serviceExtensionTimeWillExpire` cycle at a time — there's no
|
||||
/// real concurrent access to `contentHandler`/`bestAttemptContent` to guard
|
||||
@@ -17,7 +19,7 @@ final class NotificationService: UNNotificationServiceExtension, @unchecked Send
|
||||
let mutableContent = (request.content.mutableCopy() as? UNMutableNotificationContent) ?? UNMutableNotificationContent()
|
||||
bestAttemptContent = mutableContent
|
||||
|
||||
guard let imageURLString = request.content.userInfo["imageUrl"] as? String,
|
||||
guard let imageURLString = request.content.userInfo["image"] as? String,
|
||||
let imageURL = URL(string: imageURLString) else {
|
||||
deliver()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user