django-push-notifications icon indicating copy to clipboard operation
django-push-notifications copied to clipboard

Outdated docs for converting APNS certificate to .pem

Open kohlab opened this issue 4 years ago • 4 comments

Apple now gives you a .p8 certificate instead of .p12, so the documentation at django-push-notifications/docs/APNS.rst now fails.

Any guidance on how to generate the .pem I need to use this library?

kohlab avatar Sep 16 '19 19:09 kohlab

This thread helped me: #455

nlittlejohns avatar Jan 16 '20 16:01 nlittlejohns

Okay, so p8 seems to be supported now. The support was silently added in release 2.0.0 (I found it just looking at the sources).

To use p8 you need to set your settings something like this:

PUSH_NOTIFICATIONS_SETTINGS = {
        # "APNS_CERTIFICATE": - this seems to be NO longer needed, comment it out
        "APNS_AUTH_KEY_PATH": os.path.join(BASE_DIR, "your_cert.p8"),
        "APNS_AUTH_KEY_ID": "YOUR_AUTH_KEY",
        "APNS_TEAM_ID": "YOUR_TEAM_ID",
        "APNS_TOPIC": "YOUR_TOPIC", # usually same as device bundle name
        "APNS_USE_SANDBOX": True, #or false
        #"UPDATE_ON_DUPLICATE_REG_ID": True,
}

DataGreed avatar Mar 25 '20 15:03 DataGreed

@DataGreed Is direct support for .p12 a thing as well?

CodyBontecou avatar Sep 07 '20 23:09 CodyBontecou

@DataGreed Is direct support for .p12 a thing as well?

Sorry, I have no idea.

DataGreed avatar Sep 08 '20 00:09 DataGreed