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
Sometimes we are getting a MissingPluginException even though everything else seems to work fine.
It may be related to #50 because I noticed from the logs registerForPushNotifications never finished, so I am wondering if I should call Pushwoosh.getInstance.onPushReceived.listen only after registerForPushNotifications has finished (although pls notice that sometimes doesn't ever finish sometimes + pls notice that your Flutter docs doesn't say that).
Thanks!
The text was updated successfully, but these errors were encountered:
It looks like the plugin hasn't been registered on the platform side. A few questions:
Does it fail on iOS, Android, or both?
Have you executed flutter run targeting that platform since you changed the pubspec file? This is needed to have Flutter inject plugin dependencies into the platform-specific parts of your app. Please note that hot restart/hot reload is not enough to trigger the injection.
Does the GeneratedPluginRegistrant file that flutter run should have generated in your project contain a line registering the Pushwoosh plugin?
Does your AppDelegate.m (iOS) or MainActivity.java (Android) contain a call to GeneratedPluginRegistrant asking it to register itself? Those calls should be made from the app launch method (application:didFinishLaunchingWithOptions: on iOS, onCreate on Android) as exemplified below:
Android:
class MainActivity(): FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this) // this is the line in question
}
}
Hello,
Sometimes we are getting a MissingPluginException even though everything else seems to work fine.
It may be related to #50 because I noticed from the logs registerForPushNotifications never finished, so I am wondering if I should call
Pushwoosh.getInstance.onPushReceived.listen
only afterregisterForPushNotifications
has finished (although pls notice that sometimes doesn't ever finish sometimes + pls notice that your Flutter docs doesn't say that).Thanks!
The text was updated successfully, but these errors were encountered: