mirror of https://github.com/dapr/docs.git
2.3 KiB
2.3 KiB
type: docs title: "Apple Push Notification Service binding spec" linkTitle: "Apple Push Notification Service" description: "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>
databasetells the binding which APNs service to use. Set totrueto use the development service orfalseto use the production service. If not specified, the binding will default to production.key-idis the identifier for the private key from the Apple Developer Portal.team-idis the identifier for the organization or author from the Apple Developer Portal.private-keyis 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