Send iOS Push Notifications from Google App Engine python -


i have been looking everywhere example code on how python written server on gae - no luck.

can please me function this? (it should pretty straight forward believe).

i use library, , works in app.
https://github.com/simonwhitaker/pyapns

enable ssl in app.yaml

libraries: - name: ssl   version: latest 

code below, token_hex == push notification token sent device. , have variables.

from apns import apns, payload apns = apns(use_sandbox=use_sandbox,          cert_file=path/to/cert.pem',         key_file=path/to/key-noenc.pem') payload = payload(alert='hello', sound="default", badge=1,custom={}) apns.gateway_server.send_notification(token_hex, payload) (token_hex, fail_time) in apns.feedback_server.items():     logging.info(token_hex)      logging.info(fail_time) 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -