admin管理员组文章数量:1278822
My team and I are running into an issue with Firebase Cloud Messaging. We are not receiving data messages
when running the app in the foreground, background nor killed state.
We configured the following things:
APNs Authentication Key
in the Firebase Console.- Added the
Push Notifications
capability in Xcode. - Enabled
Background Fetch
&Remote Notifications
Background Modes in Xcode.
Notification Messages work nicely. However, data messages
do not trigger any of the FCM Message listeners. at least, not whilst Method Swizzling is enabled. When disabling Method Swizzling like this:
info.plist
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
the data messages
are received in the app. However, We do not want to disable method swizzling, as Firebase states that Flutter developers should not do this:
Flutter FCM Apple Integration
We are using the following FCM payload to test:
{
"message": {
"token": "{FCM_TOKEN_HERE}",
"data": {
"type": "TEST"
},
"apns": {
"payload": {
"aps": {
"content-available": 1
}
},
"headers": {
"apns-priority": "5"
}
}
}
}
EDIT: The app is using Firebase Messaging 14.8.1
See the details above.
My team and I are running into an issue with Firebase Cloud Messaging. We are not receiving data messages
when running the app in the foreground, background nor killed state.
We configured the following things:
APNs Authentication Key
in the Firebase Console.- Added the
Push Notifications
capability in Xcode. - Enabled
Background Fetch
&Remote Notifications
Background Modes in Xcode.
Notification Messages work nicely. However, data messages
do not trigger any of the FCM Message listeners. at least, not whilst Method Swizzling is enabled. When disabling Method Swizzling like this:
info.plist
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
the data messages
are received in the app. However, We do not want to disable method swizzling, as Firebase states that Flutter developers should not do this:
Flutter FCM Apple Integration
We are using the following FCM payload to test:
{
"message": {
"token": "{FCM_TOKEN_HERE}",
"data": {
"type": "TEST"
},
"apns": {
"payload": {
"aps": {
"content-available": 1
}
},
"headers": {
"apns-priority": "5"
}
}
}
}
EDIT: The app is using Firebase Messaging 14.8.1
See the details above.
Share Improve this question edited Feb 24 at 15:35 Bob-Touchwonders asked Feb 24 at 14:54 Bob-TouchwondersBob-Touchwonders 11 bronze badge1 Answer
Reset to default 0I've already found the issue myself. It seems that in the past my team chose to use the dart-only
initialization of FlutterFire. This, in our case, broke the Firebase Silent Data Messages because the GoogleService-info.plist
files were missing.
Reconfiguring FlutterFire (manually) and adding the GoogleService-info.plist
solved the problem.
本文标签: Flutter Firebase Cloud Messaging Not Receiving Silent Data Messages on iOSStack Overflow
版权声明:本文标题:Flutter Firebase Cloud Messaging Not Receiving Silent Data Messages on iOS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741260077a2367448.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论