android – Firebase cloud messaging open price reveals 0 for iOS on a regular basis


the appliance I am engaged on is predicated on flutter and revealed for each Android and iOS.

We now have been sending push notifications from firebase panel for the final 6 months however we have now by no means seen open charges for the ios units.

Right here is an instance marketing campaign with 1510 profitable messages
Screenshot
From the identical marketing campaign, android has 260 sends and 31 opens.
Screenshot
However after we verify ios, we have now 1250 sends and 0 opens. Screenshot

It’s like this for all of the campaigns we despatched. No knowledge for ios. And in analytics, ios has probably the most person interactions already.

I am dealing with the messages like under for each of the os’:

 Future most important() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  await FirebaseMessaging.occasion.requestPermission(
    provisional: true,
  );
  FirebaseMessaging.onBackgroundMessage(firebaseMessagingBackgroundHandler);
  FirebaseMessaging.occasion
      .getInitialMessage()
      .then((RemoteMessage message) async{
    if (message != null) {
      closing prefs = await SharedPreferences.getInstance();
      for (var dataObject in message.knowledge.entries) {
        if(dataObject.key == "customURL"){
          await prefs.setString('customURL', dataObject.worth);
        }else{
          await prefs.setString('customURL', "");
        }
      }
    }
  });
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
      .then((_) {
    runApp(MyApp());
  });

}

Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {

  for (var dataObject in message.knowledge.entries) {
    if(dataObject.key == "customURL"){
      closing prefs = await SharedPreferences.getInstance();
      await prefs.setString('customURL', dataObject.worth);
    }
  }
  print("_receiveNotification onBackgroundMessage" + message.notification.title);
  log("Dealing with a background message");

}

Do I would like so as to add a customized occasion handler for ios? I searched a lot of the docs however could not see any indicator for it.