iOS Notifications
Priority: P2 (OPTIONAL)
Push notifications using UserNotifications framework and APNs.
Guidelines
- Framework: Use
UserNotificationsfor all notification handling. - Delegate: Implement
UNUserNotificationCenterDelegatefor foreground & tap handling. - Permissions: Request
.alert,.badge,.soundafter priming the user. - APNs: Register for remote notifications in
AppDelegate. - Badges: Manage app icon badges manually (set to 0 to clear).
See APNs registration and permission examples
Anti-Patterns
- No Unconditional Requests: Explain value proposition before system dialog.
- No Missing Delegate: Notifications won't trigger foreground callbacks without it.
- No Forgotten Badge Clear: User frustration increases if badges persist.