Overview

Skill Level: Intermediate

Prerequisites

Not what you’re looking for? Check out all our available tutorials for mobile app messaging here.

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);
            }
        }
    }
    

Expected outcome

Need more help? Check out all of our available tutorials for mobile app messaging here.

Join The Discussion

Your email address will not be published. Required fields are marked *