onSelectNotification for iOS FCM not working, what can I do?

Viewed 45

I'm trying to print("test"); when I click on the notification ( with the app opened ) but it's not calling the function. What can I do? Maybe insert something inside info.plist? But i didn't found nothing for iOS like for android that you put the code for CLICK_NOTIFICATION. OBS: it works perfectly for android. follow the code:

  var androiInit = AndroidInitializationSettings('@mipmap/ic_launcher');//for logo
    var iosInit = IOSInitializationSettings();
    var initSetting=InitializationSettings(android: androiInit,iOS:
    iosInit);
    var fltNotification = FlutterLocalNotificationsPlugin();
    fltNotification.initialize(initSetting,onSelectNotification: onSelectNotification);
Future<void> onSelectNotification(String? payload) async {
print("test");
}
0 Answers
Related