Messaging

Apple Push Notification service

Send push notifications to apps on Apple devices through Apple Push Notification service (APNs) using Nuvix Messaging.

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 your 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.

Add provider

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

Add APNs provider configuration

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.

Configure provider

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

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

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

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 push notifications in Xcode

Test provider

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

Manage provider

You can update or delete a provider in the Nuvix Console.

Navigate to Messaging > Providers > click your provider. In the settings, you can update a provider's configuration or delete the provider.

To update or delete providers programmatically, use the Nuvix Server SDK.

import { Client } from '@nuvix/client';

const nx = new Client()
  .setEndpoint('https://api.nuvix.in/v1')
  .setProject('<PROJECT_ID>')
  .setKey('<API_KEY>');

const provider = await nx.messaging.updateApnsProvider(
  '<PROVIDER_ID>',
  '<NAME>',           // optional
  false,              // optional
  '<AUTH_KEY>',       // optional
  '<AUTH_KEY_ID>',    // optional
  '<TEAM_ID>',        // optional
  '<BUNDLE_ID>'       // optional
);

How is this guide?

Last updated on

Apple Push Notification service