org.mule.modules

mule-module-apple-push


Namespacehttp://www.mulesoft.org/schema/mule/apple-push
Schema Locationhttp://www.mulesoft.org/schema/mule/apple-push/current/mule-apple-push.xsd  (View Schema)
Schema Version2.0
Minimum Mule Version3.2

Module Overview

Mule Connector for Apple Push

Apple Push Notification service (APNs for short) is the centerpiece of the push notifications feature. It is a robust and highly efficient service for propagating information to devices such as iPhone, iPad, and iPod touch devices. Each device establishes an accredited and encrypted IP connection with the service and receives notifications over this persistent connection. If a notification for an application arrives when that application is not running, the device alerts the user that the application has data waiting for it.

Software developers (“providers”) originate the notifications in their server software. The provider connects with APNs through a persistent and secure channel while monitoring incoming data intended for their client applications. When new data for an application arrives, the provider prepares and sends a notification through the channel to APNs, which pushes the notification to the target device.

Summary

Configuration
<apple-push:config>
Configure an instance of this module
Message Processors
<apple-push:send>
Sends a push notification with the provided information to the iPhone identified by deviceToken.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:apple-push="http://www.mulesoft.org/schema/mule/apple-push"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/apple-push
               http://www.mulesoft.org/schema/mule/apple-push/current/mule-apple-push.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string host Hostname of Apple's Push Notification Gateway
xs:string keystore Filename of the keystore which contains the SSL certificate.
xs:string keystorePassword Password of the keystore
xs:int port Port number of Apple's Push Notification Gateway

Message Processors

<apple-push:send>

Sends a push notification with the provided information to the iPhone identified by deviceToken.

XML Sample
<apple-push:send 
	deviceToken="c9d4c07c fbbc26d6 ef87a44d 53e16983 1096a5d5 fd825475 56659ddd f715defc" 
	alert="Hello Apple Push!"
	sound="default">
		<apple-push:fields>
			<apple-push:customField1>value1</apple-push:customField> 
		</apple-push:fields>
</apple-push:send>	

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
deviceToken The device token of the iPhone to which this notification is intended
alert Optional. The alert body of the notification
sound Optional. The name of a sound file in the application bundle. The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played.
badge -1 Optional. The number to display as the badge of the application icon. If this Configurable is absent, any badge number currently shown is removed.
Child Elements
<apple-push:fields>
Optional. Application-specific custom fields. These values are presented to the application and the iOS doesn't display them automatically.