pypush-plus-plus/demo.py

8 lines
294 B
Python
Raw Normal View History

2023-04-06 01:01:07 +00:00
import apns
from base64 import b64decode, b64encode
2023-04-06 01:04:41 +00:00
conn1 = apns.APNSConnection()
print(f"Push Token 1: {b64encode(conn1.token).decode()}")
conn2 = apns.APNSConnection(cert=conn1.cert, private_key=conn1.private_key, token=conn1.token)
print(f"Push Token 2: {b64encode(conn2.token).decode()}")