You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement data fetch in the background for both IOS and Android. While I was able to achieve it on Android but unable to on IOS. Notification in general is working fine. But background messages are only delivered when app comes in foreground. Alerts are working fine in any state. Here is my configuration:
Any help will be much appreciated as I have literally read everything internet has to offer. My native IOS app in Swift has similar functions and that works like a charm
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to implement data fetch in the background for both IOS and Android. While I was able to achieve it on Android but unable to on IOS. Notification in general is working fine. But background messages are only delivered when app comes in foreground. Alerts are working fine in any state. Here is my configuration:
` @OverRide
Future registerNotificationsForUser(String currentUserId) {
firebaseMessaging.requestNotificationPermissions(
const IosNotificationSettings(sound: true, badge: true, alert: true, provisional: false));
firebaseMessaging.onIosSettingsRegistered
.listen((IosNotificationSettings settings) {
print("Settings registered: $settings");
});
`
Here is my payload for background fetch message:
{displayNameTo: someName, category: NEW_MESSAGE_CATEGORY, displayNameFrom: somaName, idTo: someId, idFrom: someId, type: someTYPE, gcm.message_id: 1611893552150294, content-available: 1.0, click_action: FLUTTER_NOTIFICATION_CLICK, aps: {content-available: 1.0}, contentAvailable: true}
Any help will be much appreciated as I have literally read everything internet has to offer. My native IOS app in Swift has similar functions and that works like a charm
Beta Was this translation helpful? Give feedback.
All reactions