【发布时间】:2020-03-08 05:42:21
【问题描述】:
我正在做一个带有通知的 React 本机项目,使用 APNs 身份验证密钥 .它在 android 和 iOS dev 上运行良好。
但是当我将 ipa 导出为 adHoc 在设备上运行时,当我将通知发送到 使用 FCM 的单个设备时,应用程序停止接收通知。只有当我发送到所有 iOS 设备时它才有效。
【问题讨论】:
标签: ios firebase react-native apple-push-notifications
我正在做一个带有通知的 React 本机项目,使用 APNs 身份验证密钥 .它在 android 和 iOS dev 上运行良好。
但是当我将 ipa 导出为 adHoc 在设备上运行时,当我将通知发送到 使用 FCM 的单个设备时,应用程序停止接收通知。只有当我发送到所有 iOS 设备时它才有效。
【问题讨论】:
标签: ios firebase react-native apple-push-notifications
尝试通过邮递员为已发送的特定用户发送通知。我认为这个问题将是错误的user_key。
发帖:https://fcm.googleapis.com/fcm/send
标题: 授权:Key='YOUR_SERVER_KEY' 内容类型:application/json
BODY:原始数据
{
"to": "User_key",
"priority": "high",
"data": {
"title": "Hello world",
"body": "Hello...",
"image": "https://vortex.accuweather.com/adc2010/images/icons-numbered/01-l.png",
"media_type": "image",
"message": "message message message messagemessage message",
"attachment": "https://vortex.accuweather.com/adc2010/images/icons-numbered/01-l.png"
},
"notification": {
"android_channel_id": "news",
"sound": "default",
"title": "Hello world",
"body": "Hello...",
"image": "https://vortex.accuweather.com/adc2010/images/icons-numbered/01-l.png"
}
}
【讨论】: