ios - Send Apple Notification Service A Message With Python -
i following documentation given following pyapns library: https://github.com/djacobs/pyapns
apns = apns(use_sandbox=true, cert_file='thepushcertificate.pem', key_file='thepushkey.pem') payload = payload(alert="checking if works", sound="default", badge=1) apns.gateway_server.send_notification(some_string, payload)
i getting following error:
sslerror: [errno 1] _ssl.c:504: error:14094410:ssl routines:ssl3_read_bytes:sslv3 alert handshake failure
this error occurs on last line of code displayed above.
what error mean? how fix this?
ps. have been stuck on couple of hours now.i found 1 similar question on here, answer did not me (for situation). continue try figure out what's going wrong, felt might helpful if more advanced ios / python developers on here. thanks!
after day of trying work, stuck new error:
ssl_ctx_use_privatekey_file:pem lib
i went through tutorial suggested in answer below numerous times, did not unfortunately. in tutorial, new combined pem file used, repo's documentation, file not used, know how should use file?
the solution problem was using password private key.
since keychain access explicitly asks password, thought necessary. it not.
everything worked fine when left password blank.
Comments
Post a Comment