Notification Content Extension for iOS

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Notification Content Extension for iOS
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Notification Content Extension for iOS

Notification Content Extension displays when user long-presses a notification (3D Touch / Haptic Touch) or expands it in Notification Center. Instead of the standard preview, the system shows a custom UIViewController that you define. Action buttons remain — they're added through UNNotificationCategory.

What Can Be Implemented

Interactive preview of an order with a map and delivery address right in the notification. An incoming message card with sender's avatar and full text. A match notification with live score that updates through UNUserNotificationCenter.current().getDeliveredNotifications(). Quick reply form without opening the app.

This doesn't require the user to open the app — everything happens in the system UI.

How It Works

Content Extension — a separate target with NSExtensionPrincipalClass inherited from UIViewController, implementing UNNotificationContentExtension. The didReceive(_ notification:) method receives UNNotification and should populate UI with payload data.

In the Extension's Info.plist, we set UNNotificationExtensionCategory — a string matching the identifier of UNNotificationCategory in the main app. Only notifications with this category will show custom UI.

class NotificationViewController: UIViewController, UNNotificationContentExtension {
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var bodyLabel: UILabel!

    func didReceive(_ notification: UNNotification) {
        let content = notification.request.content
        titleLabel.text = content.title
        bodyLabel.text = content.body
        // parse content.userInfo for additional data
    }

    func didReceive(_ response: UNNotificationResponse,
                    completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) {
        // handle action buttons tap
        completion(.dismissAndForwardAction)
    }
}

Custom size. Custom UI height is set in Info.plist through UNNotificationExtensionInitialContentSizeRatio (height to width ratio) — for example, 0.6 for a card. If dynamic height is needed, change preferredContentSize in code.

Media. If Notification Service Extension downloaded an attachment, it's available through notification.request.content.attachments. Content Extension can display this image in a custom UIImageView instead of the system preview.

Limitations

Extension doesn't have network access while displaying — this is not a bug, it's a sandbox limitation. Data must come in payload (up to 4KB for APNs) or through attachment (downloaded beforehand by Service Extension).

Interactive elements (UIButton, UITextField) are supported, but taps are handled through didReceive(_:completionHandler:) — not through regular IBAction. This is non-obvious and breaks classic UIKit on the first project.

What's Included in the Work

  • Creating Notification Content Extension target
  • Custom UI for expanded notification (XIB or programmatic)
  • Registering UNNotificationCategory with action buttons in main app
  • Handling action responses and forwarding control to app
  • App Groups for accessing shared data
  • Testing through Xcode Simulator (Notification Content Extension works in simulator, unlike Service Extension)

Timeframe

Basic custom UI for one notification type: 1–2 days. With multiple categories, interactive elements, and Service Extension integration: 2–3 days. Cost is calculated individually.