When to activate
- Setting up push notification infrastructure
- Implementing notification handlers in mobile apps
- Configuring APNs certificates or FCM service accounts
- Designing notification payloads with actions and deep links
- Debugging notification delivery issues
When NOT to use
- For email notification systems
- For in-app messaging only
- For SMS notification services
Instructions
- Choose provider. Firebase Cloud Messaging (FCM) for both platforms, or APNs + FCM separately for more control.
- iOS setup. Generate APNs key (.p8) in Apple Developer Portal. Configure in FCM console or custom server.
- Android setup. Create Firebase project, download
google-services.json. Configure FCM in AndroidManifest.xml.
- Client implementation. Request permission, register for token, handle foreground/background/killed states, implement action buttons.
- Server-side. Token management, payload construction, scheduling, batching. Use topics for broadcast, tokens for targeted.
- Deep linking. Include deep link URL in notification payload. App opens to specific screen on tap.
- Testing. Test on real devices (simulators don't receive push). Use FCM console or Postman for test sends.
Example
{
"notification": {
"title": "New message from Alex",
"body": "Hey, are you free for lunch today?",
"image": "https://cdn.example.com/avatar/alex.jpg"
},
"data": {
"type": "message",
"conversationId": "conv_123",
"deepLink": "app://chat/conv_123"
},
"android": {
"priority": "high",
"notification": { "channel_id": "messages" }
},
"apns": {
"payload": {
"aps": { "sound": "default", "badge": 1, "category": "MESSAGE" }
}
}
}
1---2name: push-notifications3description: Implement push notifications across iOS (APNs), Android (FCM), and cross-platform frameworks4allowed-tools: [Read, Write, Bash, Grep]5effort: medium6metadata:7 source: https://skillmd.com/skills/uitbreidenos/push-notifications8---910## When to activate1112- Setting up push notification infrastructure13- Implementing notification handlers in mobile apps14- Configuring APNs certificates or FCM service accounts15- Designing notification payloads with actions and deep links16- Debugging notification delivery issues1718## When NOT to use1920- For email notification systems21- For in-app messaging only22- For SMS notification services2324## Instructions25261. **Choose provider.** Firebase Cloud Messaging (FCM) for both platforms, or APNs + FCM separately for more control.272. **iOS setup.** Generate APNs key (.p8) in Apple Developer Portal. Configure in FCM console or custom server.283. **Android setup.** Create Firebase project, download `google-services.json`. Configure FCM in AndroidManifest.xml.294. **Client implementation.** Request permission, register for token, handle foreground/background/killed states, implement action buttons.305. **Server-side.** Token management, payload construction, scheduling, batching. Use topics for broadcast, tokens for targeted.316. **Deep linking.** Include deep link URL in notification payload. App opens to specific screen on tap.327. **Testing.** Test on real devices (simulators don't receive push). Use FCM console or Postman for test sends.3334## Example3536```json37{38 "notification": {39 "title": "New message from Alex",40 "body": "Hey, are you free for lunch today?",41 "image": "https://cdn.example.com/avatar/alex.jpg"42 },43 "data": {44 "type": "message",45 "conversationId": "conv_123",46 "deepLink": "app://chat/conv_123"47 },48 "android": {49 "priority": "high",50 "notification": { "channel_id": "messages" }51 },52 "apns": {53 "payload": {54 "aps": { "sound": "default", "badge": 1, "category": "MESSAGE" }55 }56 }57}58```