🔔

UserNotifications

iOS 10+

Apple's framework for managing local and remote notifications. UserNotifications provides a unified API for scheduling, displaying, and handling notifications on iOS.

System
Official Apple Documentation →
iOS Version Compatibility
99.7%
coverage

of iOS users worldwide can use UserNotifications (iOS 10+ required)

iOS VersionMarket ShareStatus
iOS 18.730.3%Supported
iOS 18.629.8%Supported
iOS 26.110.7%Supported
iOS 18.56.0%Supported
iOS 16.72.3%Supported
iOS 26.22.0%Supported
iOS 18.31.8%Supported
iOS 15.81.8%Supported
iOS 11.01.7%Supported
iOS 17.61.7%Supported

Key Features

Local notification scheduling

Remote push notifications

Rich notification content

Notification actions and categories

Notification management center

Custom notification UI

Code Examples

Request Permission

Request authorization to send notifications

import UserNotifications

func requestNotificationPermission() {
    UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in
        if granted {
            print("Notification permission granted")
        } else if let error = error {
            print("Error: \(error.localizedDescription)")
        }
    }
}

Schedule Local Notification

Schedule a notification to appear after a delay

import UserNotifications

func scheduleNotification() {
    let content = UNMutableNotificationContent()
    content.title = "Reminder"
    content.body = "Don't forget to check your app!"
    content.sound = .default
    
    let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false)
    let request = UNNotificationRequest(identifier: "reminder", content: content, trigger: trigger)
    
    UNUserNotificationCenter.current().add(request) { error in
        if let error = error {
            print("Error scheduling notification: \(error)")
        }
    }
}

Frequently Asked Questions

What is UserNotifications?

Apple's framework for managing local and remote notifications. UserNotifications provides a unified API for scheduling, displaying, and handling notifications on iOS.

Which iOS versions support UserNotifications?

UserNotifications is available on iOS 10 and later. Currently, 99.7% of iOS users worldwide can use this framework.

What are alternatives to UserNotifications?

Related frameworks include Pushkit. Each has different capabilities and iOS version requirements.