Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
apple(alert, sound, badgeCount, userData)
Signature
public static Map<String,Object> apple(String alert, String sound, Integer badgeCount, Map<String,Object> userData)
Parameters
-
alert:
Type: String
Notification message to be sent to the mobile client.
-
sound:
Type: String
Name of a sound file to be played as an alert. This sound file should be in the mobile application bundle.
-
badgeCount:
Type: Integer
-
userData:
Type: Map<String, Object>
Map of key-value pairs that contains any additional data used to provide context for the notification. For example, it can contain IDs of the records that caused the notification to be sent. The mobile client app can use these IDs to display these records.
Return Value
Type:Map<String, Object>
Returns a formatted payload that includes all of the specified arguments.
Usage
Example
See the Push Notification Example.