简体   繁体   English

django推送通知显示部署错误

[英]django push notification showing error in deployment

settings.py: 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. 从管理面板中,我创建了一个APNSDevice并输入了注册ID并选中了isActive。 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' 当我尝试发送选择设备的推送通知并单击“发送测试消息”时,收到的错误是“ 某些消息无法处理:'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. 简而言之,您需要确保将应用程序部署到设备的供应配置文件的Apple App ID与配置了服务器推送SSL证书的Apple App ID匹配。

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. 例如,您已使用com.mycompany.mypushapp的供应配置文件部署了该应用程序,但在服务器上已为com.mycompany.myusuallapp上传了推送证书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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