django - Safari push notification in python using pyapns -
what use of cert.pem , key.pem? how can create these file safari push notification?? or can send notification on safari desktop?
import time apns import apns, frame, payload apns = apns(use_sandbox=true, cert_file='cert.pem',key_file='key.pem')
send notification
token_hex = 'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b87' payload = payload(alert="hello world!", sound="default", badge=1) apns.gateway_server.send_notification(token_hex, payload)
i have done it.
payload = payload(alert={ "title": "", "body": "", }, sound="default", badge=1,url_arg={"name":"https://www.epush.in",},)
Comments
Post a Comment