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
In android I don't have any problem But in Ios I did not get any message even if my app been on foreground. In fact FirebaseMessaging.onMessage and FirebaseMessaging.onBackgroundMessage not triggered at all.
Future initialise() async {
//Firebase.initializeApp() I initialized on main method first
FirebaseMessaging _fcm = FirebaseMessaging.instance;
_fcm.requestPermission(alert: true, badge: true, sound: true);
if (Platform.isAndroid) {
_token = await _fcm.getToken();
print("------> token is: $_token");
} else if (Platform.isIOS) {
_token = await _fcm.getAPNSToken(); // token received from firebase
print("------> token is: $_token");
}
FirebaseMessaging.onMessage.listen((remoteMessage) async {
print('[onMessage] message: ${remoteMessage.data}');
var msg = PushMsgModel().wrapOriginMessage(remoteMessage);
_showOverlyNotify(msg);
});
FirebaseMessaging.onBackgroundMessage(onBackgroundMessage);
}
I created APNs certificate and I added into ios firebase project setting
I registering an App Identifier
I generating a provisioning profile and I added to Provisioning Profile in xcode.
In Xcode, I selected Runner in the Project Navigator. In the
Capabilities Tab I turned on Push Notifications and Background Modes,
and enabled Background fetch and Remote notifications under Background Modes.
I also did copy GoogleService-Info.plist file, in
ios/Runner.xcworkspace with Xcode.
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 use flutter firebase messaging on my application . I installed these libraries on pubspec.yaml file:
In android I don't have any problem But in Ios I did not get any message even if my app been on foreground. In fact
FirebaseMessaging.onMessage
andFirebaseMessaging.onBackgroundMessage
not triggered at all.For IOS configuration I added
in
Info.plist
.I created APNs certificate and I added into ios firebase project setting
I registering an App Identifier
I generating a provisioning profile and I added to
Provisioning Profile
in xcode.In Xcode, I selected Runner in the Project Navigator. In the
Capabilities Tab I turned on Push Notifications and Background Modes,
and enabled Background fetch and Remote notifications under Background Modes.
I also did copy GoogleService-Info.plist file, in
ios/Runner.xcworkspace with Xcode.
https://i.stack.imgur.com/V1V9L.png
AppDelegate.swift includes:
But I can't get any messages on android studio console when I push message from firebase console?
What is my mistake? Can someone help me?
When application can get token means my configuration is right?
I am testing on iPhone7plus(mobile) with software version 14.4
Beta Was this translation helpful? Give feedback.
All reactions