RORK LABJP
MAX — Rork Max is built on Claude Code and Claude Opus 4.6, generating native Swift apps directly instead of React NativeAPPLE — Rork Max targets the whole Apple ecosystem: iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageWORKFLOW — In practice, users settle into letting the AI scaffold while they rewrite the state management and data layer themselvesSEED — Rork raised a $15M seed led by Left Lane Capital in April, with Peak XV, True Ventures, and a16z Speedrun joiningPAPERLINE — Rork acquired app builder Paperline and says it will stay acquisitive to bring in engineering talentREVIEW — Three-month revisit reviews are growing, clarifying where the tool shines and where it doesn'tMAX — Rork Max is built on Claude Code and Claude Opus 4.6, generating native Swift apps directly instead of React NativeAPPLE — Rork Max targets the whole Apple ecosystem: iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageWORKFLOW — In practice, users settle into letting the AI scaffold while they rewrite the state management and data layer themselvesSEED — Rork raised a $15M seed led by Left Lane Capital in April, with Peak XV, True Ventures, and a16z Speedrun joiningPAPERLINE — Rork acquired app builder Paperline and says it will stay acquisitive to bring in engineering talentREVIEW — Three-month revisit reviews are growing, clarifying where the tool shines and where it doesn't
Articles/Dev Tools
Dev Tools/2026-06-18Advanced

A Custom Screen Appears When You Long-Press a Notification in a Rork Max App — Implementing a Notification Content Extension

How to add a Notification Content Extension to a Swift app generated by Rork Max so a custom UI is drawn only when the notification expands. Covers the split with the Service Extension, updating the in-notification UI from a button, sharing state via an App Group, and the order to check when nothing shows — all with working code.

Rork Max223Notification Content ExtensionPush Notifications8UserNotificationsSwift45App Group4

Premium Article

I run a small indie app on the App Store that delivers a single piece of artwork every morning. Push notifications could already show an image, but one day a user wrote in asking to save the day's picture straight from the notification. Not tap through to open the app — finish the whole thing inside the notification. That is a place standard rich notifications cannot reach.

There are two mechanisms for changing how a notification looks, and I confused them myself at first, so let me start with that distinction. Rork Max generates native Swift, but "drawing your own screen inside the notification" does not appear by running the generated scaffold as-is. Adding the extension target, matching categories, working within the memory limits — I'll walk through the dirt in the order I wired it into my own app.

The Service Extension and the Content Extension do different jobs

UserNotifications has two extension points. Confuse them and you wander a maze of "the image shows but the button does nothing" and "I built the UI but it never appears."

ExtensionWhen it runsWhat it can doWhat it cannot do
Notification Service ExtensionRight after delivery, before displayRewrite the payload, fetch attachments like images, decryptDraw UI or respond to interaction
Notification Content ExtensionWhen the user expands the notificationDraw UI in your own view controller, update it from a buttonPre-delivery payload work (that is the Service side's job)

To put it plainly: downloading the image and attaching it to the notification is the Service Extension's job, and drawing your own card with a "Save" button when that notification is expanded (long-press or pull down) is the Content Extension's job. This request was the latter. The two work together, and in production I find they usually ship as a pair.

A category is the "password" that ties it together

Whether the Content Extension appears at all comes down entirely to a matching category identifier. The flow is this:

  1. The main app registers a UNNotificationCategory (its identifier and the action buttons you want)
  2. The push payload carries the same identifier as category
  3. The Content Extension's Info.plist sets the same identifier in UNNotificationExtensionCategory

If those three drift by even one character, the custom UI silently fails to appear. No error is raised, so this is where the first failure almost always lives.

Registration on the main app side happens once, at launch.

import UserNotifications
 
enum NotificationSetup {
    static func registerCategories() {
        let save = UNNotificationAction(
            identifier: "SAVE_PICK",
            title: "Save",
            options: []
        )
        let openShuffle = UNNotificationAction(
            identifier: "SHUFFLE_PICK",
            title: "See another piece",
            options: []
        )
        let dailyPick = UNNotificationCategory(
            identifier: "DAILY_PICK",          // ← this password matters
            actions: [save, openShuffle],
            intentIdentifiers: [],
            options: []
        )
        UNUserNotificationCenter.current()
            .setNotificationCategories([dailyPick])
    }
}

The payload you send carries the same category, plus mutable-content so the Service Extension goes and fetches the image.

{
  "aps": {
    "alert": { "title": "Today's piece", "body": "Your artwork for today has arrived" },
    "mutable-content": 1,
    "category": "DAILY_PICK"
  },
  "image_url": "https://example.com/picks/2026-06-18.jpg"
}

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Separate the Service Extension (rewrite before delivery) from the Content Extension (draw on expand) and decide which one your app actually needs
Get the four Info.plist keys including UNNotificationExtensionCategory and UserInteractionEnabled, plus working code that returns completion(.doNotDismiss) to update the in-notification UI on a button tap
Learn the App Group design that shares the saved state with the main app, and the six things to check, in order, when the custom UI refuses to appear
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-07-13
Losing HealthKit Data on Incremental Sync — Designing HKQueryAnchor Persistence
When step or sleep data double-counts or goes missing on incremental HealthKit sync, the root cause is usually HKQueryAnchor persistence. Here is a working Swift design that handles newAnchor and deletedObjects correctly and stays consistent across reinstalls and background updates.
Dev Tools2026-07-11
Implementing App Clips with Rork Max — delivering the core of your app the moment someone scans a code
Building on the native Swift that Rork Max produces, this note walks through the 15 MB App Clip budget, receiving the launch URL, and handing state off to the full app.
Dev Tools2026-07-08
Working Around Rork Max's 20-Geofence Wall with Dynamic Re-registration
In a native Swift app generated by Rork Max, geofences you registered quietly stop firing past a certain count — and it's almost always iOS's silent limit of 20 monitored regions per app. Here's a dynamic re-registration design that keeps only the nearest 20 live, plus a Swift implementation you can drop in.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →