KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

APNSMessage.Builder Class

Builder of APNSMessage.

Syntax

public class APNSMessage.Builder

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from object.

Public Methods

Build () : APNSMessage
Build and return APNSMessage.
Enable (bool) : APNSMessage.Builder
Set flag of APNS delivery. If omit calling this method, APNS delivery is enabled. If KiiCorp.Cloud.Storage.KiiPushMessage.Builder.EnableAPNS(bool) called after KiiPushMessage.Builder.WithAPNSMessage(GCMMessage), This property would be overwritten. (The converse also overwrite the property.)
WithAlertActionLocKey (string) : APNSMessage.Builder
Build with alert action loc key. Corresponding to APNS's "action-loc-key" in apns.alert
WithAlertBody (string) : APNSMessage.Builder
Build with alert body message. Corresponding to APNS's "body" in apns.alert
WithAlertLaunchImage (string) : APNSMessage.Builder
Build with alert launch Image. Corresponding to APNS's "launch-image" in apns.alert
WithAlertLocArgs (string[]) : APNSMessage.Builder
Build with alert locArgs. Corresponding to APNS's "loc-args" in apns.alert
WithAlertLocKey (string) : APNSMessage.Builder
Build with alert loc key. Corresponding to APNS's "action-loc-key" in apns.alert
WithAlertSubtitle (string) : APNSMessage.Builder
Build with alert subtitle. Corresponding to APNS's "subtitle" in apns.alert
WithAlertTitle (string) : APNSMessage.Builder
Build with alert title. Corresponding to APNS's "title" in apns.alert
WithAPNSData (APNSData) : APNSMessage.Builder
Create builder with Data that will be sent only to iOS-APNS devices. Corresponding to APNS's custom payload. The data specified here will be merged with the data specified on KiiPushMessage.BuildWith(KiiPushMessage.Data)
WithBadge (int) : APNSMessage.Builder
If provided, it will be used as the "badge" to be sent with the notification. Corresponding to APNS's "badge" in aps notification payload.
WithCategory (string) : APNSMessage.Builder
Build with category. Corresponding to APNs's "category" in apns. For details, please refer to APNS document
WithContentAvailable (int) : APNSMessage.Builder
Build with content-available. Corresponding to APNs's "content-available" in apns. For details, please refer to APNS document
WithMutableContent (int) : APNSMessage.Builder
Build with mutable-content. Corresponding to APNs's "mutable-content" in apns.
WithSound (string) : APNSMessage.Builder
If provided, it will be used as the "sound" to be sent with the notification. Corresponding to APNS's "sound" in aps notification payload.

Member Details

Build Method

Build and return APNSMessage.

Syntax

public APNSMessage Build ()

Returns

APNSMessage

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Enable Method

Set flag of APNS delivery. If omit calling this method, APNS delivery is enabled. If KiiCorp.Cloud.Storage.KiiPushMessage.Builder.EnableAPNS(bool) called after KiiPushMessage.Builder.WithAPNSMessage(GCMMessage), This property would be overwritten. (The converse also overwrite the property.)

Syntax

public APNSMessage.Builder Enable (bool enabled)

Parameters

enabled
if true message would be delivered via APNS. If false, this message would not delivered thru APNS.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertActionLocKey Method

Build with alert action loc key. Corresponding to APNS's "action-loc-key" in apns.alert

Syntax

public APNSMessage.Builder WithAlertActionLocKey (string actionLocKey)

Parameters

actionLocKey
String that iOS uses as a key to get localized string in to use for alert "View" button.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertBody Method

Build with alert body message. Corresponding to APNS's "body" in apns.alert

Syntax

public APNSMessage.Builder WithAlertBody (string body)

Parameters

body
APNS alert message text.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertLaunchImage Method

Build with alert launch Image. Corresponding to APNS's "launch-image" in apns.alert

Syntax

public APNSMessage.Builder WithAlertLaunchImage (string launchImage)

Parameters

launchImage
The filename of an image file in the application bundle.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertLocArgs Method

Build with alert locArgs. Corresponding to APNS's "loc-args" in apns.alert

Syntax

public APNSMessage.Builder WithAlertLocArgs (string[] locArgs)

Parameters

locArgs
Variable string values to appear in place of the format specifiers in locKey.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentException Is thrown when an argument is null or empty.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertLocKey Method

Build with alert loc key. Corresponding to APNS's "action-loc-key" in apns.alert

Syntax

public APNSMessage.Builder WithAlertLocKey (string locKey)

Parameters

locKey
String that used as a key to an alert-message string in a "localizable.strings" file for current localization.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertSubtitle Method

Build with alert subtitle. Corresponding to APNS's "subtitle" in apns.alert

Syntax

public APNSMessage.Builder WithAlertSubtitle (string subtitle)

Parameters

subtitle
Documentation for this section has not yet been entered.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAlertTitle Method

Build with alert title. Corresponding to APNS's "title" in apns.alert

Syntax

public APNSMessage.Builder WithAlertTitle (string title)

Parameters

title
APNS alert title text.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAPNSData Method

Create builder with Data that will be sent only to iOS-APNS devices. Corresponding to APNS's custom payload. The data specified here will be merged with the data specified on KiiPushMessage.BuildWith(KiiPushMessage.Data)

Syntax

public APNSMessage.Builder WithAPNSData (APNSData data)

Parameters

data
APNS specific data.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithBadge Method

If provided, it will be used as the "badge" to be sent with the notification. Corresponding to APNS's "badge" in aps notification payload.

Syntax

public APNSMessage.Builder WithBadge (int badge)

Parameters

badge
The number to display as the badge of the application icon.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithCategory Method

Build with category. Corresponding to APNs's "category" in apns. For details, please refer to APNS document

Syntax

public APNSMessage.Builder WithCategory (string category)

Parameters

category
APNs category field string.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithContentAvailable Method

Build with content-available. Corresponding to APNs's "content-available" in apns. For details, please refer to APNS document

Syntax

public APNSMessage.Builder WithContentAvailable (int available)

Parameters

available
APNs content-available field number. If 0, content-available payload is not delivered. Otherwise, content-available=1 payload is delivered.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithMutableContent Method

Build with mutable-content. Corresponding to APNs's "mutable-content" in apns.

Syntax

public APNSMessage.Builder WithMutableContent (int mutableContent)

Parameters

mutableContent
APNs mutable-content field number.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithSound Method

If provided, it will be used as the "sound" to be sent with the notification. Corresponding to APNS's "sound" in aps notification payload.

Syntax

public APNSMessage.Builder WithSound (string sound)

Parameters

sound
The name of a sound file in the application bundle.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0