You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Pinpoint::Types::APNSMessage

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing APNSMessage as input to an Aws::Client method, you can use a vanilla Hash:

{
  action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
  badge: 1,
  body: "__string",
  category: "__string",
  data: {
    "__string" => "__string",
  },
  json_data: "__string",
  media_url: "__string",
  preferred_authentication_method: "__string",
  raw_content: "__string",
  silent_push: false,
  sound: "__string",
  substitutions: {
    "__string" => ["__string"],
  },
  thread_id: "__string",
  title: "__string",
  url: "__string",
}

APNS Message.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#actionString

The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user\'s device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

Possible values:

  • OPEN_APP
  • DEEP_LINK
  • URL

Returns:

  • (String)

    The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background.

#badgeInteger

Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.

Returns:

  • (Integer)

    Include this key when you want the system to modify the badge of your app icon.

#bodyString

The message body of the notification, the email body or the text message.

Returns:

  • (String)

    The message body of the notification, the email body or the text message.

#categoryString

Provide this key with a string value that represents the notification\'s type. This value corresponds to the value in the identifier property of one of your app\'s registered categories.

Returns:

  • (String)

    Provide this key with a string value that represents the notification\'s type.

#dataHash<String,String>

Returns:

  • (Hash<String,String>)

#json_dataString

The data payload used for a silent push. This payload is added to the notifications\' data.pinpoint.jsonBody\' object

Returns:

  • (String)

    The data payload used for a silent push.

#media_urlString

The URL that points to a video used in the push notification.

Returns:

  • (String)

    The URL that points to a video used in the push notification.

#preferred_authentication_methodString

The preferred authentication method, either \"CERTIFICATE\" or \"TOKEN\"

Returns:

  • (String)

    The preferred authentication method, either \"CERTIFICATE\" or \"TOKEN\".

#raw_contentString

The Raw JSON formatted string to be used as the payload. This value overrides the message.

Returns:

  • (String)

    The Raw JSON formatted string to be used as the payload.

#silent_pushBoolean

Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

Returns:

  • (Boolean)

    Indicates if the message should display on the users device.

#soundString

Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app\'s main bundle or in the Library/Sounds folder of your app\'s data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.

Returns:

  • (String)

    Include this key when you want the system to play a sound.

#substitutionsHash<String,Array<String>>

Returns:

  • (Hash<String,Array<String>>)

#thread_idString

Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.

Returns:

  • (String)

    Provide this key with a string value that represents the app-specific identifier for grouping notifications.

#titleString

The message title that displays above the message on the user\'s device.

Returns:

  • (String)

    The message title that displays above the message on the user\'s device.

#urlString

The URL to open in the user\'s mobile browser. Used if the value for Action is URL.

Returns:

  • (String)

    The URL to open in the user\'s mobile browser.