# push-notifications

Review, build, and debug local and APNs remote notifications for iOS and macOS in Swift. Handles permission flows, silent pushes, and service extensions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4200 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/push-notifications/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/push-notifications

## What it does

The skill provides guidelines and patterns for handling `UserNotifications` and APNs in Swift 6.3 apps targeting iOS 26+, maintaining compatibility down to iOS 16. It covers registration via `UIApplicationDelegateAdaptor`, alert authorization, provisional delivery, and critical alerts. Related areas are decoupled explicitly: background workloads belong in `background-processing`, VoIP goes to `callkit`, and Live Activities are handled by `activitykit`.

When auditing notification code, the skill enforces key platform contracts. Device tokens must upload on every `didRegister` event rather than trusting a local cache. Because the iOS Simulator cannot register real device tokens with APNs, testing simulated pushes requires `.apns` files or `simctl push`.

Rich notifications also come with strict requirements. Service extensions need both an alert payload and `mutable-content: 1` to execute; silent pushes will not wake them. The skill flags missing fallbacks and ensures the completion handler runs exactly once, even if network attachments fail.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill push-notifications -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/push-notifications/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/push-notifications/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill push-notifications -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/push-notifications/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill push-notifications -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/push-notifications/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills push-notifications
```

2. **Manually: put the files in place**
- File: `.github/skills/push-notifications/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill push-notifications -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/push-notifications
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/push-notifications/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill push-notifications -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/push-notifications/SKILL.md

## When to use it
- configure APNs token callbacks via `UIApplicationDelegateAdaptor`
- audit silent push payloads for `apns-push-type` and priority flags
- implement rich notification attachments in service extensions
- set up provisional or critical alert permissions using `UNUserNotificationCenter`

## Example prompts
- Help me implement APNs token registration in SwiftUI using AppDelegate
- Review my UNNotificationServiceExtension code for proper completion handler calls
- Configure a background push payload with apns-priority 5

## Similar
- [capacitor-push-notifications](https://affpapa.org/en/nevibecode/skills/capacitor-push-notifications.md) — skill · 1100 installs
- [push-notification-setup](https://affpapa.org/en/nevibecode/skills/secondsky-push-notification-setup.md) — skill · 418 installs
- [cmux-architecture](https://affpapa.org/en/nevibecode/skills/cmux-architecture.md) — skill · 4900 installs
- [release-review](https://affpapa.org/en/nevibecode/skills/release-review.md) — skill · 514 installs
- [swift-development](https://affpapa.org/en/nevibecode/skills/swift-development.md) — skill · 488 installs
- [swift-expert](https://affpapa.org/en/nevibecode/agents/swift-expert.md) — subagent · 378 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
