Share via


ApplePushMessage Class

Definition

The ApplePushMessage helps generating a notification payload targeting Apple Push Notification Service. Notifications can be sent using the PushClient class.

[System.Serializable]
public class ApplePushMessage : System.Collections.Generic.Dictionary<string,object>, Microsoft.Azure.Mobile.Server.Notifications.IPushMessage
[<System.Serializable>]
type ApplePushMessage = class
    inherit Dictionary<string, obj>
    interface IPushMessage
Public Class ApplePushMessage
Inherits Dictionary(Of String, Object)
Implements IPushMessage
Inheritance
ApplePushMessage
Attributes
Implements

Constructors

ApplePushMessage()

Initializes a new instance of the ApplePushMessage class enabling creation a notification message targeting Apple Push Notification Service. Set the appropriate properties on the message and submit through the PushClient.

ApplePushMessage(SerializationInfo, StreamingContext)

Initializes a new instance of the ApplePushMessage class with the specified serialization information and streaming context.

ApplePushMessage(String, Nullable<TimeSpan>)

Initializes a new instance of the ApplePushMessage class with a given alert message and an optional expiration of the notification.

Properties

Aps

Gets the ApsProperties for this ApplePushMessage.

Expiration

Sets or gets the lifetime of the notification. At the end of the lifetime, the notification is no longer valid and can be discarded. If this value is non-null, APNs stores the notification and tries to deliver the notification at least once. Specify null to indicate that the notification expires immediately and that APNs should not store the notification at all.

JsonPayload

As an alternative to building the notification by initializing the ApplePushMessage directly, it is possible to provide a complete JSON representation which will be sent to the Notification Hub unaltered.

Methods

ToString()

Provides a JSON encoded representation of this ApplePushMessage

Extension Methods

TryRemove<TKey,TValue>(Dictionary<TKey,TValue>, TKey, TValue)

Removes the value associated with specified key.

Applies to