Skip to content

Commit e505bab

Browse files
committed
Update README
1 parent b0638e8 commit e505bab

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ Basic Usage
6262
client_cert='/path/to/apns-cert.pem',
6363
use_sandbox=False,
6464
)
65-
apns_key_client = APNs(
66-
key='/path/to/apns-key.p8',
67-
key_id='<KEY_ID>',
68-
team_id='<TEAM_ID>',
69-
topic='<APNS_TOPIC>', # Bundle ID
70-
use_sandbox=False,
71-
)
65+
with read('/path/to/apns-key.p8') as key:
66+
apns_key_client = APNs(
67+
key=key,
68+
key_id='<KEY_ID>',
69+
team_id='<TEAM_ID>',
70+
topic='<APNS_TOPIC>', # Bundle ID
71+
use_sandbox=False,
72+
)
7273
request = NotificationRequest(
7374
device_token='<DEVICE_TOKEN>',
7475
message = {

0 commit comments

Comments
 (0)