Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 31 lines (22 sloc) 924 Bytes
title url layout
Push Notifications
references/phonegap-cli/push
subpage

The push command is used to send push notifications for the PhoneGap Developer app to consume. Available since version 6.2.0.

Usage

phonegap push [options]

Options

Some options are available for specifically setting the device to send to, the type of service to use and the data to send to the application.

--deviceID <deviceID>   device ID (required)
--service <service>     target service, "gcm", "apns" or "apns-sandbox" (required)
--payload <data>        JSON object to be sent via push service (required)

Examples

$ phonegap push --deviceID APA91bE1MmeTc92igNoi5OkDWUV --service gcm --payload '{ "data": { "title": "Hello", "message": "World"} }'
$ phonegap push --deviceID APA91bE1MmeTc92igNoi5OkDWUV --service apns --payload '{ "aps": { "alert": "Hello World", "badge": 5 } }'