This guide walks you through setting up push notifications for your application. You’ll learn how to configure push notification services, activate devices, and send your first push notification.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ably/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- An Ably account
- An Ably app with an API key
- For mobile: Access to Firebase Console (Android) or Apple Developer Account (iOS)
- For web: A web application with HTTPS support
Choose your platform
Quick setup overview
Regardless of platform, the setup process follows these steps:Platform-specific guides
For detailed setup instructions for each platform:iOS (APNs)
- Create APNs certificates
- Configure your Xcode project
- Request push permissions
- Handle push notifications
Android (FCM)
- Create a Firebase project
- Add FCM to your app
- Configure Ably with FCM credentials
- Handle push notifications
Web Push
- Generate VAPID keys
- Configure service worker
- Request notification permission
- Handle push notifications
Testing push notifications
Use the Ably dashboard to test push notifications:- Go to your app in the dashboard
- Navigate to the Dev Console tab
- Select a channel
- Click Publish message
- Add push notification extras
- Click Publish
Publish methods
Via channels (recommended)
Publish to all devices subscribed to a channel:Direct publishing
Publish to specific devices or clients:Common notification formats
Basic notification
With action buttons (iOS)
With custom data
Troubleshooting
Device not receiving notifications
- Verify device is activated:
realtime.push.activate() - Check subscription:
realtime.push.admin.channelSubscriptions.list() - Verify credentials in dashboard
- Check device permissions
Notifications not appearing
- Verify push extras format
- Check notification payload size (< 4KB for APNs, < 4KB for FCM)
- Monitor
[meta]log:pushchannel for errors - Verify app is not in focus (some platforms)
Testing in development
- Use APNs development certificates for iOS
- Use Firebase test messages for Android
- Test on physical devices, not simulators
- Check device system settings
Next steps
- Learn about publishing push notifications
- Understand device activation
- Explore push admin API
- Monitor push errors
