Send push notification_
Send push notification to your users using Appwrite Messaging.
5 min read
You can send, schedule, and manage push notifications to your apps using Appwrite Messaging. Push notifications can be used to deliver new message notifications, app updates, promotional offers, and other messages straight to your user's devices.
1. Add provider
Push notifications must be sent through third-party providers, like Apple Push Notification service and Firebase Cloud Messaging. The push notification APIs for Apple and Android devices can only be accessed through these services.
You must configure these services before you can send your first push notification.
APNS
Configure APNs for push notification to Apple devices.
FCM
Configure FCM for push notification to Android and Apple devices.
2. Add targets
Before sending your first push notification, your application must register itself for push notification, then provide the device token to Appwrite.
3. Request permissions
Your app must ask for permission to receive push notification from the user.
4. Send message
You can send messages in both the Appwrite Console and programmatically using the Appwrite Server SDK.
If you enabled Sandbox on your APNs provider, Appwrite will send push notifications to the development APNs environment. This requires you to use a Development profile in XCode.
If XCode is not default to a development profile, click your root-level app in XCode > Signing & Capabilities > Capabilities > uncheck Automatically manage signing. Then manually select a Provisioning profile that is a Distribution profile.
Was this page helpful?
Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.