Implement or debug local and APNs notifications, permissions, payloads, categories, actions, silent pushes, and notification extensions. Use for alerts, badges, sounds, background delivery, rich content, registration, or delivery diagnosis; route Live Activity updates to activitykit.
Ships in all-ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Implement, review, and debug local and remote notifications with UserNotifications and APNs. Target the project's deployment range; examples assume modern Swift concurrency and note availability when using newer APIs.
Keep adjacent domains separate: Live Activity content-state pushes belong to activitykit; PushKit/VoIP calls to callkit; App Clip ephemeral setup to app-clips; long-running or scheduled background work to background-processing.
Read only the references needed for the request:
.apns, simctl, APNs Sandbox Simulator coverage, provider/device matrices, or delivery diagnosis, read notification delivery testing.Do not read every reference for a narrow task. Keep the response scoped to the failed or requested delivery path.
Notification authorization controls user-visible alerts, sounds, and badges. Request it in context and check notificationSettings() because the user can change settings later.
APNs registration is a separate path. Call registerForRemoteNotifications() whenever a device token is needed, including server binding or background delivery. Do not gate it on .authorized.
Receive tokens through application-delegate callbacks. Treat token data as opaque, convert it to hex for transport, and upload on every successful callback. Do not assume a fixed length or treat a locally cached token as provider truth.
func application(
_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
let token = deviceToken.map { String(format: "%02x", $0) }.joined()
Task { await tokenService.upload(token) }
}
On supported current Xcode/OS hosts, iOS Simulator can register with the APNs Sandbox and receives a simulator-specific, variable-length token. Provider delivery to that Simulator is useful for sandbox end-to-end checks. .apns files and simctl push simulate delivery without exercising the provider path; host/CI support varies. Verify production entitlements, signing, and hardware-specific behavior on a physical device.
| Path | Required contract | Key limitation |
|---|---|---|
| Visible remote | aps.alert, apns-push-type: alert | Presentation depends on authorization, app state, Focus, and delegate policy |
| Background remote | content-available: 1 only in aps, push type background, priority 5 | Low priority, throttled, coalesced, and not guaranteed |
| Service extension | Alert payload plus mutable-content: 1 | Silent-only, sound-only, or badge-only pushes don't launch it |
| Local | UNNotificationRequest with time/calendar/location trigger | Device scheduling and current authorization determine presentation |
Put Apple keys inside aps and minimal app routing identifiers beside it. Treat payload data as untrusted: validate identity/authorization against current app or server state before navigation or mutation. Avoid sensitive plaintext.
Background pushes are hints to fetch current state, not a timer. Enable Background Modes > Remote notifications, perform bounded work, and return the correct UIBackgroundFetchResult. Route BGTaskScheduler design to background-processing.
Set UNUserNotificationCenter.current().delegate during launch, before responses can arrive.
@MainActor
final class NotificationDelegate: NSObject, UNUserNotificationCenterDelegate {
func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification
) async -> UNNotificationPresentationOptions {
[.banner, .list, .sound, .badge]
}
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse
) async {
await notificationRouter.handle(response)
}
}
Keep payload parsing in a testable boundary. Hand a validated destination or intent to the app's existing navigation/state owner; notification delegates should not create a competing navigation architecture.
Foreground receipt does not automatically show UI. Return only the presentation options the product wants. Handle body taps, dismiss callbacks when registered, and custom action identifiers deliberately.
Register categories during launch. Payload category and local categoryIdentifier values must exactly match the registered identifier.
Choose action options from behavior:
.foreground launches the app for UI work;.authenticationRequired protects sensitive actions until unlock;.destructive communicates irreversible intent;UNTextInputNotificationAction supports inline text response.Validate identifiers in userInfo again before calling services. Define idempotency for actions the system or user may invoke more than once.
For flawed designs, name the violated contract rather than only showing replacement code:
mutable-content: 1.UNNotificationAttachment.serviceExtensionTimeWillExpire().removeAll… for a feature that doesn't own every app notification.evals/evals.json (opens in a new tab)references/apns-lifecycle.md (opens in a new tab)references/communication-notifications.md (opens in a new tab)references/content-extension.md (opens in a new tab)references/local-notifications.md (opens in a new tab)references/notification-patterns-complete.md (opens in a new tab)references/notification-patterns.md (opens in a new tab)references/notification-runtime.md (opens in a new tab)references/notification-testing.md (opens in a new tab)references/rich-notifications-complete.md (opens in a new tab)references/rich-notifications.md (opens in a new tab)references/service-extension.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/all-ios-skills:push-notificationsfrom all-ios-skills
npx claudepluginhub thienqo/ios-skills --plugin all-ios-skills95 skills in this plugin
/accessorysetupkitDiscover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit. Use when presenting a privacy-preserving accessory picker, defining discovery descriptors for BLE or Wi-Fi devices, handling accessory session events, migrating from CoreBluetooth permission-based scanning, or setting up accessories without requiring broad Bluetooth permissions./activitykitBuild or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit./adattributionkitMeasure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.Other plugins' skills for the same job