Provisioning profiles for Service Extension and Content Extension

Jay T picture Jay T · Jun 19, 2018 · Viewed 7k times · Source

I am trying to implement Rich notifications in my iOS application and while using Notification Service Extension and Notification Content Extension, post running my app I am getting error of same bundle identifier. For these extensions do I need to use separate provisioning profiles? Like one for my code, one for Notification Service Extension and one for Notification Content Extension?

Answer

Ravish Kumar picture Ravish Kumar · Jun 19, 2018

Yes you have to use separate provisioning profile for Notification Service Extension and Notification Content Extension. For reference you can use this link.

https://mobisoftinfotech.com/resources/mguide/ios-10-rich-notifications-tutorial/

Service extensions:

A Service extension’s entry point class UNNotificationServiceExtension

It overrides 2 methods:

func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
}

func serviceExtensionTimeWillExpire() {
}

Content extension’s entry point class is UIViewController and it implements protocol

func didReceive(_ notification: UNNotification) {
}