I am using firebase_messaging to manage notifications on a Flutter app.
No problems with Android.
When I try in iOS to subscibe to a topic (again, which WORKS PERFECTLY on Android) I get no error, but I've understood that something bad is happening in the background, since the next line of code is always skipped, exactly like when Flutter goes in exception:
void _subscribeToTopic(String topic) async {
await FCMHelper.firebaseMessaging.subscribeToTopic(topic);
await SharedPrefsHelper.sp.setBool(topic, true);
}
The await SharedPrefsHelper.sp.setBool(topic, true);
is NEVER executed, meaning that subscribeToTopic is going in error.
I'm astonished that as it seems, nobody had this problem before me (no issue on GitHub, no question on StackOverflow) but I really don't know what to do, especially because I don't know Swift nor Objective-C, so if there is a bug in the code, I'm not able to find it.
Please help me. Thanks