In iOS 10, two frameworks has been introduced for handling push notification with content. You can have a push notification with image, gif, audio and video. Apart from that you can also have your custom UI for notifications. For this, payload can be modified and used to download content before the notification is drawn. You simply need to follow the below steps to add two of the extensions targets for handling these notifications:Service Extension and Content Extension.
Before proceeding make sure to download all the files to be used here. You should have these files with you

  1. TacNotifications.framework
  2. NotificationService
  3. NotificationVC

Notification Service Extension

Service extension is basically the target extension where you get a callback when a push is delivered to the device. You can download and create attachments here. If you fail to download the content and pass it to contentHandler within certain time, default standard notification will be drawn.
Adding Service extension

  1. Add an iOS target and choose Notification Service extension and proceed. Add a product name, select the language as swift and Finish. When created you will be prompted to activate the target. Once activated, you can see 2 files added, NotificationService.swift and Info.plist.

  2. Please delete the NotificationService.swift file and Info.plist.
  3. Add these files from downloaded NotificationService
  4. Add TacNotifications.framework to extension target. Do not add it to main app target.

Adding Content Extension

  1. Add an iOS target and choose Notification Content extension and proceed. Add a product name, select the language as swift and Finish. When created you will be prompted to activate the target. Once activated, you can see 3 files added, NotificationVC.swift, MainInterface.storyboard and Info.plist.

  2. Please delete NotificationViewController.swift, MainInterface.storyboard and Info.plist.
  3. Add these files from downloaded NotificationVC
  4. You must create a bridging header and add iCarousel.h in Bridging-Header, so that the objective C files can be used in your extension targets.
  5. Add TacNotifications.framework to extension target. Do not add it to main app target.

Finally make sure you add TacNotifications.framework to 'Embedded Binaries' section of your main App's General settings.

Note: Do not add TacNotifications.framework to 'Linked frameworks and libraries' section of your main App's General settings. This will cause a crash on devices below iOS 10.