Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dpearson2699/push-notifications
Implement, review, or debug push notifications in iOS/macOS apps — local notifications, remote (APNs) notifications, rich notifications, notification actions, silent pushes, and notification service/content extensions.
Passed 19 of 22 test cases with the skill, and 17 of 22 without it.
2 fixed17 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
I'm building an iOS app in Swift and drafted a flow that requests user authorization for alerts before initiating APNs registration, caching the token locally to avoid re-uploading it to our backend unless it changes. Could you review this architecture against standard iOS notification guidelines, identify any violated implementation contracts or flawed assumptions, and provide a corrected AppDelegate implementation in Swift?
| Checked | Without skill | With skill |
|---|---|---|
| States that APNs token registration must not be gated on user alert authorization. | Passed | Passed |
| States that device tokens must be uploaded on every didRegister callback. | Passed | Passed |
| States that token length should never be assumed fixed. | Missed | Passed |
| Mentions simctl push or .apns files to simulate push delivery on Simulator. | Missed | Passed |
The instructions your model reads when the skill loads.
Implement, review, and debug local and remote notifications on iOS/macOS using UserNotifications and APNs. Covers permission flow, token registration, payload structure, foreground handling, notification actions, grouping, and rich notifications. Targets iOS 26+ with Swift 6.3, backward-compatible to iOS 16 unless noted.
Keep adjacent domains separate: Live Activity content-state payloads belong in activitykit; PushKit/VoIP call pushes belong in callkit; App Clip ephemeral notification setup belongs in app-clips; long-running or scheduled background work after a silent push belongs in background-processing.
When reviewing flawed notification proposals, explicitly name the violated contract. APNs token reviews must say token registration is independent from alert authorization, upload on every didRegister callback, avoid local-cache-as-truth logic, never assume token length, and treat Simulator registration failure as expected while noting .apns files or simctl push can simulate delivery. Background-push reviews must say content-available only, apns-push-type: background, apns-priority: 5, Remote notifications background mode, low priority, throttled, not guaranteed, not every few minutes, and bounded didReceiveRemoteNotification returning the correct UIBackgroundFetchResult. Rich-notification reviews must say service extensions require mutable-content: 1 plus an alert payload, silent pushes do not trigger them, attachments are supported on-disk files that the system validates and stores, secrets use Keychain Sharing while App Groups are for shared files/UserDefaults, communication notifications require capability + NSUserActivityTypes + INInteraction donation + content.updating(from:), and every service-extension path including attachment/download failures and serviceExtensionTimeWillExpire() must call the content handler exactly once with original, best-attempt, or updated content.
Request notification authorization before scheduling or displaying user-visible alerts, sounds, or badges. The system prompt appears only once; subsequent calls return the stored decision. APNs token registration is separate: call registerForRemoteNotifications() when the app needs a device token, even if the user hasn't granted alert authorization.
import UserNotifications
@MainActor
func requestNotificationPermission() async -> Bool {
let center = UNUserNotificationCenter.current()
do {
let granted = try await center.requestAuthorization(
options: [.alert, .sound, .badge]
)
return granted
} catch {
test cases passed, vs 17 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.