80
push notification
The OS delivers a message while you are not running. Tapping it is a deep link, not a mystery.
What is push notification?
A push notification is sent through APNs or FCM to a device token. The app may be dead. The payload should name the destination. Permission is separate from the token, and the token rotates.
Why does push notification matter when vibe coding?
Models “add notifications” as an in-app toast. That is not push. Or they send a push with no tap target. Name permission, token, and the deep link.
How do you do push notification?
Ask permission in context, not on first launch. Store the device token per user. Payload includes the entity id. Tap opens that screen from cold start. Handle token refresh.
How do you ask a model for push notification?
Real push via (APNs or FCM), not an in-app toast. Ask permission in context. Save the device token. The payload deep-links to (screen). Handle cold start and token refresh.
What goes wrong with push notification?
One token per user forever. Reinstalls and second phones exist. Store many tokens, delete dead ones.