Apple Push Notification service

Apple Push Notification service (APNs) lets you send push notifications to Apple devices like macOS, iOS, tvOS, iPadOS, and watchOS devices. APNs is a best-effort service, and will attempt to deliver you messages to your device when it's online and available again. APNs will save the last message for 30 days or less and attempt delivery as soon as it's online.

1

Add provider

To add APNs as a provider, navigate to Messaging > Providers > Create provider > Push notification.

Add a FCM provider

Add a FCM provider

Give your provider a name > choose APNS > click Save and continue. The provider will be saved to your project, but not enabled until you complete its configuration.

2

Configure provider

In the Configure step, you will need to provide details from your Apple developer account to connect your Appwrite project with your Apple developer account.

You will need to provide the following information from the Apple Developer Member Center.

  • Team ID

    Head to Apple Developer Member Center > Membership details > Team ID

    Team ID
    Team ID

  • Bundle ID

    Head to Apple Developer Member Center > Program resources > Certificates, Identifiers & Profiles > Identifiers

    Bundle ID

    Bundle ID

  • Authentication key ID

    Head to Apple Developer Member Center > Program resources > Certificates, Identifiers & Profiles > Keys. Click on your key to view details. The key needs Apple Push Notification Service enabled.

    Authentication Key ID

    Authentication Key ID

  • Authentication key (.p8 file)

    Head to Apple Developer Member Center > Program resources > Certificates, Identifiers & Profiles > Keys. Create a key and give it a name. Enable the Apple Push Notifications service (APNS), and register your key. The key needs Apple Push Notification Service enabled.

    Authentication Key

    Authentication Key

  • Sandbox

    Enable sandbox mode for testing on apps signed with development provisioning profiles. APNs offers two environments, Development (sandbox) and Production. Development builds on XCode signed with a development provisioning profile will use the development environment. Production builds signed with a production provisioning profile will use the production environment.

After adding the following details, click Save and continue to enable the provider.

3

Configure app

Some additional configuration is required to enable push notifications in your iOS app. Add push notification capability to your app by clicking your root-level app in XCode > Signing & Capabilities > Capabilities > Search for Push Notifications.

Enable PN on Xcode

Enable PN on Xcode

4

Test provider

Push notification requires special handling on the client side. Follow the Send push notification flow to test your provider.

5

Manage provider