The documentation you are viewing is for Dapr v0.11 which is an older version of Dapr. For up-to-date documentation, see the latest version.

Apple Push Notification Service binding spec

Detailed documentation on the Apple Push Notification Service binding component

Configuration

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
  namespace: <NAMESPACE>
spec:
  type: bindings.apns
  version: v1
  metadata:
    - name: development
      value: <true | false>
    - name: key-id
      value: <APPLE_KEY_ID>
    - name: team-id
      value: <APPLE_TEAM_ID>
    - name: private-key
      secretKeyRef:
        name: <SECRET>
        key: <SECRET-KEY-NAME>
  • database tells the binding which APNs service to use. Set to true to use the development service or false to use the production service. If not specified, the binding will default to production.
  • key-id is the identifier for the private key from the Apple Developer Portal.
  • team-id is the identifier for the organization or author from the Apple Developer Portal.
  • private-key is a PKCS #8-formatted private key. It is intended that the private key is stored in the secret store and not exposed directly in the configuration.

Request Format

{
    "data": {
        "aps": {
            "alert": {
                "title": "New Updates!",
                "body": "There are new updates for your review"
            }
        }
    },
    "metadata": {
        "device-token": "PUT-DEVICE-TOKEN-HERE",
        "apns-push-type": "alert",
        "apns-priority": "10",
        "apns-topic": "com.example.helloworld"
    },
    "operation": "create"
}

The data object contains a complete push notification specification as described in the Apple documentation. The data object will be sent directly to the APNs service.

Besides the device-token value, the HTTP headers specified in the Apple documentation can be sent as metadata fields and will be included in the HTTP request to the APNs service.

Response Format

{
    "messageID": "UNIQUE-ID-FOR-NOTIFICATION"
}

Output Binding Supported Operations

  • create
Last modified July 7, 2022: update nav bar v0.11 (#2633) (b309d3d)