简体   繁体   中英

django push notification showing error in deployment

settings.py:

PUSH_NOTIFICATIONS_SETTINGS = {

    "APNS_CERTIFICATE": os.path.join(BASE_DIR, 'app.pem'),
    "APNS_TOPIC": "app.Tamakoshi",
    "APNS_USE_SANDBOX":True,

}

from the admin panel i created a APNSDevice and entered the Registration ID as well with isActive checked. When I try to send the push notification selecting the device and clicking on 'Send test message', the error I get is Some messages could not be processed: 'DeviceTokenNotForTopic'

I've seen this error before and found the answer here !:

In short, you need to ensure that the Apple App ID of the provisioning profile with which the application is deployed to a device is matching the Apple App ID for which the server push SSL certificate is configured.

For example, you have deployed the app with the provisioning profile for com.mycompany.mypushapp but on the server you have uploaded a push certificate for com.mycompany.myusuallapp.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM