Links

iOS: Rich Notification

In iOS, It is necessary to create Notification Service Extension to attach media such as an image.

1. Add a Notification Service Extension

In Xcode, select Notification Service Extension from File > New > Target
Enter the Product Name. In this guide, we will define it as FlareLaneNotificationServiceExtension.
Set Deployment Info of the extension created to the same version as the main target.

2. Install SDK to Extension

After exiting Xcode, add the following code to your Podfile and Run pod install.
Podfile
// Enable the Dynamic Framework
use_frameworks!
// Add the name of the extension created previously.
// In this guide, FlareLaneNotificationServiceExtension.
target 'FlareLaneNotificationServiceExtension' do
pod 'FlareLane'
end

3. Update Extension

Run Xcode again and edit the extension's file. Delete the pre-filled codes and only inherit FlareLaneNotificationServiceExtension.
Swift(NorificationService.swift)
Objective-C(NotificationService.h/.m)
import FlareLane
class NotificationService: FlareLaneNotificationServiceExtension {
}
// NotificationService.h
@import FlareLane;
@interface NotificationService : FLNNotificationServiceExtension
@end
// NotificationService.m
#import "NotificationService.h"
@implementation NotificationService
@end