-
Notifications
You must be signed in to change notification settings - Fork 86
pushnotification apn send
Matthias Görges edited this page Mar 16, 2015
·
1 revision
pushnotification-apn-send sends an Apple Push Notification message to a device.
Parameter | Description |
---|---|
certfile | File including the .pem certificate |
keyfile | File including the .pem private key |
password | Password for the private key file |
token | u8vector containing the unique device identifier |
msg | String to be send |
badgenum | Optional: Number to be shown on the app icon |
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 demonstrates the process needed to create the required certificates and provisioning profiles for the Apple Push Notification service.
Example 1: Send two messages given the key files are located in the applications directory.
Convert the .cer file into a .pem file: openssl x509 -in aps_development.cer -inform der -out AppNameCert.pem
Convert the private key (.p12 file) into a .pem file: openssl pkcs12 -nocerts -in AppName.p12 -out AppNameKey.pem
(define pushnotification-apn-test
(let ((token (u8vector 166 240 26 12 90 100 191 58 48 224 18 178 53 157 103 79
156 174 38 103 112 139 18 47 65 174 182 196 16 207 74 2))
(message "Hello World! This is a test.")
(message2 "LambdaNative with BadgeNum")
(certfilename "AppNameCert.pem")
(keyfilename "AppNameKey.pem")
(password "AppName-pw"))
(display (pushnotification-apn-send certfilename keyfilename password token message))
(thread-sleep! 5)
(display (pushnotification-apn-send certfilename keyfilename password token message2 99))
))
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip