Playing a custom sound when a push notification arrives from the Apple Push Notification Service (APNS) is quite simple.
This tip assumes you're using our extension and that you've already got push notifications running.
Firstly you need to create your sound and export as an iOS supported format, such as
Then you need to include the sound to your AIR application and make sure it's packaged with the application. If you are using
adt then you just need to make sure it's included as a packaged resource in your script / command line. In Flash Builder you should make sure the sound is checked to be packaged in the following location:
Project / Properties / Actionscript Build Packaging / Apple iOS / Package Contents
To play this sound you must specify the filename of the sound in the notification payload. For example, lets say you've added a sound file named
example.caf into your application, we can play this sound with the notification payload as below:
- aps =
- alert = "test example notification message";
- sound = "example.caf";
Then the custom sound will play when your notification arrives.