Skip to content

Commit dcbd63a

Browse files
matthewhjleclanche
authored andcommitted
Provide default and documentation for APNS_TOPIC
Without a default, PyAPNS2 will raise an error serializing None. Resolves: #377
1 parent 3998996 commit dcbd63a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ For WNS, you need both the ``WNS_PACKAGE_SECURITY_KEY`` and the ``WNS_SECRET_KEY
7272
**APNS settings**
7373

7474
- ``APNS_CERTIFICATE``: Absolute path to your APNS certificate file. Certificates with passphrases are not supported.
75+
- ``APNS_TOPIC``: The topic of the remote notification, which is typically the bundle ID for your app. If you omit this header and your APNs certificate does not specify multiple topics, the APNs server uses the certificate’s Subject as the default topic.
7576
- ``APNS_USE_ALTERNATIVE_PORT``: Use port 2197 for APNS, instead of default port 443.
7677
- ``APNS_USE_SANDBOX``: Use 'api.development.push.apple.com', instead of default host 'api.push.apple.com'.
7778

push_notifications/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
else:
2424
PUSH_NOTIFICATIONS_SETTINGS.setdefault("APNS_USE_SANDBOX", False)
2525
PUSH_NOTIFICATIONS_SETTINGS.setdefault("APNS_USE_ALTERNATIVE_PORT", False)
26+
PUSH_NOTIFICATIONS_SETTINGS.setdefault("APNS_TOPIC", "")
2627

2728
# WNS
2829
PUSH_NOTIFICATIONS_SETTINGS.setdefault("WNS_PACKAGE_SECURITY_ID", None)

0 commit comments

Comments
 (0)