[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:
@@ -250,6 +250,7 @@ struct OtpView: View {
|
||||
appState.session.jwt = response.result?.token
|
||||
let hasServerAddress = hydrateUserState(from: response.result?.customer)
|
||||
routeAfterLogin(hasServerAddress: hasServerAddress)
|
||||
Task { await PushNotificationCoordinator.shared.syncCustomerAttributes() }
|
||||
}
|
||||
} catch {
|
||||
await MainActor.run {
|
||||
@@ -281,6 +282,8 @@ struct OtpView: View {
|
||||
appState.profile.email = customer.email
|
||||
appState.profile.phone = customer.phoneNumber ?? ""
|
||||
appState.profile.profilePicture = customer.profilePicture ?? ""
|
||||
appState.profile.notificationsEnabled = customer.notificationsEnabled ?? false
|
||||
appState.profile.faceIdEnabled = customer.faceIdEnabled ?? false
|
||||
appState.favorites.storeIds = Set(customer.favorites ?? [])
|
||||
SessionStateStore.setActiveUserKey(
|
||||
SessionStateStore.makeUserKey(profileId: customer.id, email: customer.email)
|
||||
|
||||
Reference in New Issue
Block a user