Riki1200 / azure_notification_hub_new

Flutter support for using Azure Notification Hun Plugin in iOS and Android apps.
Other
0 stars 0 forks source link

Cannot register device to get notification #1

Closed ewaradomska closed 5 months ago

ewaradomska commented 5 months ago

Hello, I have a problem with my implementation of AzureNotificationHubNew. I used only an example code - added a method to my initState in App() widget: My iOS notifications are configured with certificates (working properly with Firebase). Unfortunately when I try to send notification with Azure Notifications Hub (test), nothing happened. I'm wondering if there is anything more I should add to my AzureNotificationHubNew implementation?


void setupAzureNotifications() {
    AzureNotificationHubNew azureNotificationHubNew = AzureNotificationHubNew();

    azureNotificationHubNew.configure(
      onLaunch: (Map<String, dynamic> message) async {
        print('onLaunch: $message');
      },
      onResume: (Map<String, dynamic> message) async {
        print('onResume: $message');
      },
      onMessage: (Map<String, dynamic> message) async {
        print('onMessage: $message');
      },
      onToken: (notification) async {
        print('onToken: $notification');
      },
    );
  }
Riki1200 commented 5 months ago

Hi there, you have to add to config in your info.plist image

ewaradomska commented 5 months ago

Oh, yes, forgot about it!! Works perfect :D Thank you very much :)