Custom Notification Content Extension for iOS

You've received a task: a custom interface for iOS push notification with a delivery map and "Accept"/"Reject" buttons. The standard iOS UI won't do — you need your own extension. This extension is the only way to add an interactive preview without opening the app. Often the standard preview is insu

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 1All 1734 services
Custom Notification Content Extension for iOS
Medium
~2-3 days

Our competencies:

Frequently Asked Questions

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    894
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    782
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1216
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1079
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    1002
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    597

You've received a task: a custom interface for iOS push notification with a delivery map and "Accept"/"Reject" buttons. The standard iOS UI won't do — you need your own extension. This extension is the only way to add an interactive preview without opening the app. Often the standard preview is insufficient: you need to display a map, an order form, or a custom button. For that, iOS provides the Notification Content Extension mechanism. However, its setup requires careful work with UNNotificationCategory, proper configuration of the Info.plist, and understanding of sandbox constraints. Over the years, we've accumulated 12+ successful cases — from logistics maps to interactive surveys.

Notification Content Extension for iOS Mechanism

Content Extension is a separate target with its own UIViewController implementing UNNotificationContentExtension. When the user expands a notification with the matching category, the system loads your controller and calls didReceive(_:). Action buttons are added via UNNotificationCategory in the main app. The payload must contain a category with the same identifier.

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 button taps completion(.dismissAndForwardAction) } } 

Category Registration for Notification Content Implementation

The notification category must be registered before the first notification is sent — typically in AppDelegate or via UNUserNotificationCenter.current().setNotificationCategories([...]). The category identifier must match UNNotificationExtensionCategory in the extension's Info.plist.

Setting Custom UI Size

The height is set in the extension's Info.plist via UNNotificationExtensionInitialContentSizeRatio (height-to-width ratio). For example, 0.6 for an order card. If dynamic height is needed, change preferredContentSize in code. This technique adapts to different content — from a short message to a map with a route. Height ratio ranges from 0.2 to 0.8, supporting content types like text, maps, and forms. Dynamic height is used in 80% of implementations.

Content Type InitialContentSizeRatio preferredContentSize (in code)
Text with one button 0.2 150x320
Map with route 0.8 400x320
Input form 0.5 300x320

Media attachments are accessible via notification.request.content.attachments. If Notification Service Extension has pre-downloaded an image, Content Extension will display it in a custom UIImageView without the system preview.

Network Requests Restriction

This restriction is by design. Data must come in the payload (up to 4KB for APNs) or via attachment. If you need a live match score, update the UI via UNUserNotificationCenter.current().getDeliveredNotifications() — we implemented this for a sports app, and it worked.

Interactive elements (UIButton, UITextField) are supported, but taps are processed through didReceive(_:completionHandler:), not via IBAction. This detail broke the first UIKit project of a novice. In SwiftUI, it's easier: use onTapGesture with action passing via closure.

Comparison: UIKit vs SwiftUI

Characteristic UIKit SwiftUI
Code size ~150 lines ~50 lines (66% shorter)
Animation complexity Medium Low (withAnimation)
iOS support 10+ 16+
Interactivity Via delegation Via binding
Development speed 2x slower Faster (less boilerplate)

The SwiftUI implementation uses three times fewer lines and is easier to maintain, but requires iOS 16+. A custom UI is 3x more effective at driving user actions than standard notification banners. SwiftUI reduces development time by 50% compared to UIKit for custom notification UIs.

How to Update Data Without Network?

Leverage App Groups for shared storage. Notification Service Extension can save current data to the shared container, and Content Extension can read it before display. Alternatively, pass a small flag in the payload and load static content from the bundle.

Example payload for delivery map
{ "aps": { "alert": { "title": "Order #123", "body": "Courier has left" }, "category": "delivery_map" }, "latitude": 53.9, "longitude": 27.56, "order_id": "123" } 

What's Included in Turnkey Work

  • Creating the extension target
  • Custom UI (XIB, UIKit, or SwiftUI) with adaptive height
  • Registering UNNotificationCategory with action buttons (supports up to 10 per category)
  • Handling action responses and passing control to the app
  • Setting up App Groups for shared data access
  • Testing on simulator and real device via TestFlight

Work Process

  1. Analytics — define notification types, payload structure, categories. Assess target iOS versions.
  2. Design — UI/UX prototype considering constraints (no network, 4KB payload reduces size by 90% compared to standard). Choose UIKit or SwiftUI.
  3. Implementation — develop the extension and integrate with the main app. Configure provisioning profiles.
  4. Testing — check on different devices and iOS versions, including push notification simulation.
  5. Deployment — prepare App Store Connect, publish via TestFlight, final review.

Timelines and Guarantee

Basic custom interface for a single notification type: from 1 to 2 days. For multiple categories, interactive elements, and Service Extension integration: from 2 to 3 days. Typical cost for a single notification type: $500–$1,000. We guarantee the solution will pass App Store review (Section 4.2). Our engineers have 5+ years of iOS experience. Budget is determined after analysis — contact us for a free assessment. Average savings of 40% in development time compared to building from scratch. For a typical logistics app, implementing a custom notification with map and action buttons can save over $2,000 in development costs.

Typical Mistakes in Implementation

  • Forgetting to set UNNotificationExtensionCategory in Info.plist — extension won't work.
  • Using direct network connection — runtime crash.
  • Trying to resize via constraints without considering preferredContentSize — gives a clipped UI.
  • Not synchronizing category identifiers between main app and Extension.

For more details on Content Extension capabilities, see official Apple documentation.

Evaluate your project for free — contact us. Order a turnkey integration, and we'll implement a custom UI for any push notifications considering all iOS constraints.