Not sending Subscription to Azure Notification Hub on iOS
Closed this issue · 1 comments
aherrick commented
I have the plugin setup on AppDeleate like this:
AzurePushNotificationManager.Initialize(AzureConstants.ListenConnectionString, AzureConstants.NotificationHubName, options);
AzurePushNotificationManager.CurrentNotificationPresentationOption = UNNotificationPresentationOptions.Alert | UNNotificationPresentationOptions.Badge | UNNotificationPresentationOptions.Sound;
I've configured my Azure Notification Hub. It prompts me to accept notifications which I do, however nothing is ever sent to Azure. My notification hub never receives a subscription.
I've subscribed to OnNotificationError
but not seeing anything there.
CrossAzurePushNotification.Current.OnNotificationError += async (s, p) =>
{
await AppHelper.CurrentPage.Instance.DisplayAlert("OnNotificationError", p.Message, "Ok");
};
aherrick commented
I had forgotten this part:
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
AzurePushNotificationManager.DidRegisterRemoteNotifications(deviceToken);
}
public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
{
AzurePushNotificationManager.RemoteNotificationRegistrationFailed(error);
}
// To receive notifications in foreground on iOS 9 and below. To receive notifications in
// background in any iOS version
public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler)
{
AzurePushNotificationManager.DidReceiveMessage(userInfo);
}