- Notifications — created from your backend, targeted and scheduled.
- Device subscriptions — registering each device that should receive them.
Notification lifecycle
A notification is created withIsReadyToDistribute set to false while you prepare it, then flipped to true to release it. DeliveryDate schedules the send; ExpirationDate stops delivery after a cut-off, which matters for time-sensitive content.
A DeepLink object sends the customer to a specific screen when they tap through.
Targeting
Subscribing a device
A device receives nothing until it is subscribed. Do this when a customer first signs in, when they grant notification permission, after a reinstall, when they sign in on another device, and whenever the OS refreshes the token.1
Check permission
Confirm the customer has granted push permission at OS level. Without it there is no token to register.2
Get the device token
Request it from the platform:- iOS —
UIApplication.shared.registerForRemoteNotifications() - Android —
FirebaseMessaging.getInstance().getToken() - Huawei — HMS Push Kit SDK
3
Generate an installation ID
Create it on first launch and keep it for the life of the installation. It is what distinguishes one of the customer’s devices from another.4
Subscribe
Send the customer ID, token, platform and installation ID.5
Watch for token changes
Tokens rotate on OS updates, reinstalls and security refreshes. Listen for the change and re-subscribe with the same installation ID so you update the existing subscription instead of creating a duplicate.What you send
A customer can hold several active subscriptions at once — personal phone, tablet, work phone. Each device subscribes individually with its own token and installation ID. Subscriptions persist until they are explicitly removed or the device goes quiet for long enough to be treated as inactive.
Unsubscribing a device
Unsubscribing is device-specific: only the installation ID you name stops receiving notifications, and the customer’s other devices carry on.Unsubscribing is a soft delete. The subscription is marked inactive rather than removed, so reporting and the audit trail stay intact, and the same installation ID can be reused when re-subscribing. Notifications already delivered stay on the device.