任何人都可以帮助我为什么我的 iOS 设备在我通过 fcm 测试推送通知时无法接收任何触发器?与android相比,一切正常。这是一张我已经启用我的 Xcode 配置的照片。这是我跟踪集成和设置的链接 https://firebase.flutter.dev/docs/messaging/overview/
答案 0 :(得分:0)
这很棘手...
假设您按照 Apple integration docs...
通过 APNs 的 FCM 不适用于 iOS 模拟器。接收消息 & 通知需要真实设备。
来源:https://firebase.flutter.dev/docs/messaging/apple-integration
// CONSTRUCT NOTIFICATION PAYLOAD
message = {
"notification": {
"body": body,
},
// apple push notification service
"apns": {
"payload":
{
"aps": {
"alert": {
"body": body,
},
"sound": "default",
},
}
},
token: fcmToken,
};
见:https://firebase.flutter.dev/docs/messaging/usage/
另见:https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#ApnsConfig