-
Notifications
You must be signed in to change notification settings - Fork 111
Update content for APNS push guide #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: push-provider-guides
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for docs-novu failed. Why did it fail? →
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughRestructured and expanded APNS integration documentation to provide a comprehensive end-to-end configuration guide, including credential setup, Novu connection steps, subscriber token management via API examples, notification sending, and customization payloads, while removing outdated pre-trigger setup content. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
public/images/channels-and-providers/push/apns/apns-integration.pngis excluded by!**/*.png
📒 Files selected for processing (1)
content/docs/platform/integrations/push/(providers)/apns.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/platform/integrations/push/(providers)/apns.mdx
[grammar] ~39-~39: Ensure spelling is correct
Context: ...ields and under the Delivery Provider Crendetials section fill in the following fields:...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
- GitHub Check: Build and Lint
🔇 Additional comments (1)
content/docs/platform/integrations/push/(providers)/apns.mdx (1)
103-116: Update documentation to use consistent SDK package across examples.The code snippet uses
@novu/node, but the official TypeScript SDK documentation in this project (atcontent/docs/platform/sdks/server/typescript.mdx) recommends@novu/api. While @novu/node is a valid package with trigger method signaturenovu.trigger(workflowIdentifier: string, options: {...}), this creates inconsistency within the documentation.Either:
- Update apns.mdx to use
@novu/api(matching the TypeScript SDK docs pattern)- Update the initialization to use object syntax:
new Novu({ secretKey: '<NOVU_SECRET_KEY>' })instead of string parameterThe TypeScript SDK documentation shows the current recommended pattern for Node.js environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good doc, but I am a little confused by the format. It seems undecided about whether it is a guide or a tutorial. It starts out generic like a guide, but the tone is very casual and the last notification and trigger are written out like a tutorial.
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; | ||
|
|
||
| [Apple Push Notification Service](https://docs.expo.dev/push-notifications/overview/), as the name suggests, is a notification delivery service provided by Apple. | ||
| This guide will walk you through the entire process of configuring and using the <a href="https://developer.apple.com/notifications/" target="_blank" rel="noopener noreferrer">Apple Push Notification Service (APNS)</a> with Novu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This guide will walk you through the entire process of configuring and using the <a href="https://developer.apple.com/notifications/" target="_blank" rel="noopener noreferrer">Apple Push Notification Service (APNS)</a> with Novu. | |
| This guide walks you through the entire process of configuring and using the <a href="https://developer.apple.com/notifications/" target="_blank" rel="noopener noreferrer">Apple Push Notification Service (APNS)</a> with Novu. |
| This guide will walk you through the entire process of configuring and using the <a href="https://developer.apple.com/notifications/" target="_blank" rel="noopener noreferrer">Apple Push Notification Service (APNS)</a> with Novu. | ||
|
|
||
| Apple provides two authentication methods to make a secure connection to APNs. The first is Certificate-Based Authentication (using a .p12 certificate). The second is Token-Based Authentication (using a .p8 key). We'll make use of the **.p8** key. | ||
| ## How to configure APNS with Novu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## How to configure APNS with Novu | |
| ## Configure APNS with Novu |
| 3. Enable the Apple Push Notifications service (APNs) checkbox by selecting it. | ||
| 4. Click the **Continue** button and on the next page, select **Register**. | ||
| 5. Download the **.p8** key file. | ||
| Apple provides two authentication methods to make a secure connection to APNs. The first is a certificate based authentication (using a `.p12` certificate). The second is token based authentication (using a `.p8` key). We'll make use of the `.p8` key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Apple provides two authentication methods to make a secure connection to APNs. The first is a certificate based authentication (using a `.p12` certificate). The second is token based authentication (using a `.p8` key). We'll make use of the `.p8` key. | |
| Apple provides two authentication methods to make a secure connection to APNS. The first is a certificate-based authentication using a `.p12` certificate. The second is token based authentication using a `.p8` key. For this guide, you'll use the `.p8` key. |
| Follow <a href="https://developer.apple.com/help/account/keys/create-a-private-key" target="_blank" rel="noopener noreferrer">this Apple’s official guide</a> to generate and download the p8 key for your account. | ||
|
|
||
| The overrides field supports all [Notification payload](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification?language=objc) values, as shown below: | ||
| You also need the following to connect Novu to APNs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APNs or APNS? Choose one and use it throughout.
|
|
||
| ```typescript | ||
| import { Novu } from '@novu/api'; | ||
| * <a href="https://developer.apple.com/help/account/keys/get-a-key-identifier/" target="_blank" rel="noopener noreferrer">**Key ID**</a>: This is a 10-character unique identifier for the authentication key. You can find it in the key details section of the newly created key in your Apple developer account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * <a href="https://developer.apple.com/help/account/keys/get-a-key-identifier/" target="_blank" rel="noopener noreferrer">**Key ID**</a>: This is a 10-character unique identifier for the authentication key. You can find it in the key details section of the newly created key in your Apple developer account. | |
| * <a href="https://developer.apple.com/help/account/keys/get-a-key-identifier/" target="_blank" rel="noopener noreferrer">**Key ID**</a>: This is a 10-character unique identifier for the authentication key. You can find it in the key details section of the newly-created key in your Apple developer account. |
| * **Team ID**: Your 10-character Team ID. | ||
| * **Bundle ID**: Your app's Bundle ID. | ||
|  | ||
| 6. Click **Create Integration**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens next? How do I know the integration was created successfully?
|
|
||
| ### Step 1: Add subscriber device token | ||
|
|
||
| Before Novu can send a push notification to a subscriber(user), you must associate their device's unique push token with their Novu subscriber profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Before Novu can send a push notification to a subscriber(user), you must associate their device's unique push token with their Novu subscriber profile. | |
| Before Novu can send a push notification to a subscriber (user), you must associate their device's unique push token with their Novu subscriber profile. |
| Checkout the [API reference](/api-reference/subscribers/update-provider-credentials) for more details. | ||
| ### Step 2: Send a notification | ||
|
|
||
| Now you're ready to send a push notification. [Create a workflow with a Push step](/platform/workflow/build-a-workflow) and trigger it. Novu will send the notification to all devices associated with the subscriber. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Now you're ready to send a push notification. [Create a workflow with a Push step](/platform/workflow/build-a-workflow) and trigger it. Novu will send the notification to all devices associated with the subscriber. | |
| Now you're ready to send a push notification. [Create a workflow with a Push step](/platform/workflow/build-a-workflow) and trigger it. Novu sends the notification to all devices associated with the subscriber. |
| subscriberId: "subscriberId", | ||
| }, | ||
| payload: { | ||
| abc: 'def', // If the notification is a data notification, the payload will be sent as the data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| abc: 'def', // If the notification is a data notification, the payload will be sent as the data | |
| abc: 'def', // If the notification is a data notification, then the payload is sent as the data |
|
|
||
| Now you're ready to send a push notification. [Create a workflow with a Push step](/platform/workflow/build-a-workflow) and trigger it. Novu will send the notification to all devices associated with the subscriber. | ||
|
|
||
| The example below demonstrates a simple trigger using Novu’s SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you also want to link to instructions for more complex triggers so that the user can iterate on this simple one?
Summary by CodeRabbit
Release Notes