Meteor raix:push:通知设置中只有 "Badges" 而不是 "Badges, Sounds, Banners"
Meteor raix:push: Only "Badges" instead of "Badges, Sounds, Banners" in Notifications settings
在“设置”应用的“通知”部分,我的应用仅在其下方列出了 "Badges",而它应该包含 "Badges, Sounds, Banners"。
因此,当收到新通知时,我没有收到 "notified",即没有横幅、没有声音、没有振动。通知显示在通知托盘和锁定屏幕上,徽章编号更新,但没有提醒。
有什么解决办法吗?
我的 config.push.json 看起来像这样:
{
"apn": {
"passphrase": "passphrase",
"key": "PushChatKey.pem",
"cert": "PushChatCert.pem"
},
"production":false,
"badge": true,
"sound": true,
"alert": true,
"vibrate": true
}
然后我发送这样的通知:
`Push.send({
from: 'Test',
title: 'Hello',text: 'World',
badge: 4,
query: {},
sound: 'default'
});`
(类似于 但使用不同的框架。)
我能够在服务器和客户端上使用 Push.Configure({}) 设置来解决这个问题。
服务器代码:
Push.Configure({
apn:{
passphrase:'password',
certData: Assets.getText('enter certificate pem file name'),
keyData: Assets.getText('enter key pem file name')
},
production: false //or true if production
});
客户端代码(包括alert:true对我有用):
Push.Configure({
badge:true,
sound:true,
alert:true
});
在“设置”应用的“通知”部分,我的应用仅在其下方列出了 "Badges",而它应该包含 "Badges, Sounds, Banners"。
因此,当收到新通知时,我没有收到 "notified",即没有横幅、没有声音、没有振动。通知显示在通知托盘和锁定屏幕上,徽章编号更新,但没有提醒。
有什么解决办法吗?
我的 config.push.json 看起来像这样:
{
"apn": {
"passphrase": "passphrase",
"key": "PushChatKey.pem",
"cert": "PushChatCert.pem"
},
"production":false,
"badge": true,
"sound": true,
"alert": true,
"vibrate": true
}
然后我发送这样的通知:
`Push.send({
from: 'Test',
title: 'Hello',text: 'World',
badge: 4,
query: {},
sound: 'default'
});`
(类似于
我能够在服务器和客户端上使用 Push.Configure({}) 设置来解决这个问题。
服务器代码:
Push.Configure({
apn:{
passphrase:'password',
certData: Assets.getText('enter certificate pem file name'),
keyData: Assets.getText('enter key pem file name')
},
production: false //or true if production
});
客户端代码(包括alert:true对我有用):
Push.Configure({
badge:true,
sound:true,
alert:true
});