[push/opt-in-prompts] Implement push notifications client integration
Build the full client half of docs/api/push-notifications-integration-guide.md: OS permission + APNs device-token registration and pipeline wiring, profile notifications/biometric-login toggles on the Ver Perfil screen reflecting server truth, order-tracking opt-in fallback prompt, profile-cache refresh on every mutation, a Notification Service Extension for rich/image push, the Push Notifications capability, targeting-attributes sync, campaign open tracking, and tap-to-order deep linking with foreground notification display.
This commit is contained in:
@@ -18,7 +18,15 @@ public final class PediFoodsAppDelegate: Sendable {
|
||||
private init() {}
|
||||
|
||||
public func onInit() { logger.debug("onInit") }
|
||||
public func onLaunch() { logger.debug("onLaunch") }
|
||||
public func onLaunch() {
|
||||
logger.debug("onLaunch")
|
||||
Task { @MainActor in
|
||||
PushNotificationCoordinator.shared.startObservingDeviceToken()
|
||||
PushNotificationCoordinator.shared.becomeNotificationCenterDelegate()
|
||||
await PushNotificationCoordinator.shared.refreshRegistrationIfAuthorized()
|
||||
await PushNotificationCoordinator.shared.syncCustomerAttributes()
|
||||
}
|
||||
}
|
||||
public func onResume() {
|
||||
logger.debug("onResume")
|
||||
NotificationCenter.default.post(name: .appDidResume, object: nil)
|
||||
|
||||
Reference in New Issue
Block a user