iOS Notifications

Setup iOS mobile push notifications on MagicBell

Deliver mobile push notifications with Apple Push Notification service

To deliver push notifications from your iOS app you need to register a new auth key for the Apple Push Notification service (APNs). MagicBell will use P8 tokens to authenticate requests made to the APNs.

Follow these steps to register a new key:

  1. Login to your Apple developer account and open the keys page (you have to enroll in Apple's Developer Program, before).
  2. Register a new key, make sure you enable "Apple Push Notifications service (APNs)"
  3. Apple will generate a 10-digit ID and an authentication token signing key. Store it safely.

To configure iOS mobile push notifications for your MagicBell project, follow these steps:

  1. From the Settings Channels page in your dashboard, select Add Provider Mobile Push Safari APNs .
  2. Enable the provider and complete the required fields, then click Save.

MagicBell needs the P8 key ID, team ID for your Apple account, P8 cert, and the iOS app's bundle ID.

Provider Overrides

Our create notifications endpoint allows you to customize the payload sent to the APNs by setting notification.overrides.

The notification.overrides.ios parameter accepts all the body parameters of the APNs API.

Provider-specific parameters in notification.overrides take precedence over the ones specified in notification.

Example: Set the bagde of the app icon

{
  "notification": {
    "title": "We are processing your order",
    "content": "

Thank you for your order. We will notify you when these items are ready.

", "recipients": [ { "email": "dan@example.com" } ], "overrides": { "providers": { "apns": { "aps": { "badge": 5 } } } } } }