Configuring the Subscription
To Create an Apple Push Subscription
- In the FME Server Web User Interface, select Notifications > Subscriptions, and click New.
- Provide a name for the Subscription.
- Beside Protocol, specify Apple Push Notification.
- Specify the Topics you want to subscribe to using the drop-down selector. To create a topic and use it right away, click +.When the Subscription receives messages from these topics, an Apple Push notification is sent to the target devices.
- Specify the Apple Push fields for the Subscription (see below).
- Click OK to create the Subscription.
Apple Push Field | Description |
---|---|
Keystore File | Upload the SSL keystore .p12 file, used for creating a secure, authenticated connection to the Apple Push Notification Service. |
Keystore Password | The password used to access the keystore. |
Service Type | The keystore environment type (sandbox or production). |
iOS Device Tokens |
The list of target iOS devices to receive notifications. Use a comma to separate multiple devices. Note: This field is primarily for testing purposes. To override this field in a production system, see below. |
Content Template | The notification content template. |
Overriding Behavior Using Notification Keywords
By default, an Apple Push Subscriber configuration allows for delivery of notifications to a fixed set of iOS devices, with its message formatted by the prescribed content template. The Apple Push subscriber also allows you to specify target iOS devices and message format in the incoming notification. The notification keywords that enable this overriding behavior are apns_token
and subscriber_content
.
apns_token
—Overrides the ‘iOS Device Tokens’ field in an Apple Push subscription. Use a comma to separate multiple devices.subscriber_content
—Overrides the ‘Content Template’ field in an Apple Push subscription.
Examples
The following Apple Push Subscriber examples are based on this default configuration:
iOS Device Tokens | 123456,abcdef |
Content Template | Message: {msg} |
Notification | Target Device(s) | Message Sent to Device(s) |
---|---|---|
{ "msg" : "Hello, world" } |
123456 abcdef |
Message: Hello, world |
{ "apns_token" : "987654", "msg" : "Hello, 987654" } |
987654 |
Message: Hello, 987654 |
{ "subscriber_content" : "Alert", "msg" : "Ignored" } |
123456 abcdef |
Alert |
Sending Silent Notifications
You can send silent notifications to an iOS device. This way, notifications are received directly by an iOS app, without the explicit knowledge of the user (that is, the user does not receive any notification). To send a silent notification, do one of the following:
- Send a notification with the
subscriber_content
keyword set to an empty string. - Send a notification without the
subscriber_content
keyword and leave the Content Template field empty in the subscription configuration.