Setting up the iOS notification service extension in Xamarin

Step-by-step

1. Setup the iOS notification service extension

  1. Right click on the project in the navigator on the left, then select Add -> Add New Project.
  2. Select iOS -> Extension -> Notification Service Extension.
  3. Right click on new Project's References then select Edit References.
  4. Add AcousticMobilePush.iOS.Notification.dll to project.
  5. Add MceConfig.json from the iOS project to the iOS Notification project.
  6. Replace the NotificationService.cs file with the following contents:
using System;
using Foundation;
using UserNotifications;
using AcousticMobilePush.iOS.Notification;

namespace Sample.iOS.Notification
{
    [Register("NotificationService")]
    public class NotificationService : MCENotificationService
    {
        public override void DidReceiveNotificationRequest(UNNotificationRequest request, Action<UNNotificationContent> contentHandler)
        {
            base.DidReceiveNotificationRequest(request, contentHandler);
        }
    }
}