How to create a notification extension without using a storyboard

I want to create a notification content extension to use the new iOS 10 rich notifications. However, in the main application, we do not use the interface constructor. How do I create a content extension that does not use the story pane?

+4
source share
1 answer
  • Create the goal of expanding notification content as usual.

  • Delete the storyboard file from the project

  • Remove the NSExtensionMainStoryboard entry from the Info.plist extension.

  • NSExtensionPrincipalClass Info.plist NSExtension. ViewController. , Pretty Notification, PrettyNotificationViewController, Pretty_Notification.PrettyNotificationViewController.

. UNNotificationContentExtension

+5

Source: https://habr.com/ru/post/1656864/


All Articles