One Logo Pool Ball
Foundation · IOS API REFERENCE

UserDefaults.SizeLimitExceededMessage

struct · iOS 26.0+ · SDK 27.1

struct SizeLimitExceededMessage

A message the system sends when the size of the data in the defaults database exceeds the maximum. In tvOS, the system posts this message as a warning when the size of your app’s defaults database reaches 512 kilobytes. If your app continues to write to the defaults database, the system terminates your app when the database reaches or exceeds 1 megabyte in size. The system doesn’t post size exceeded messages for platforms other than tvOS. The system posts this message on your app’s main thread. Observe this message with the identifier ``NotificationCenter/MessageIdentifier/sizeLimitExceeded``, or specify its type directly to the `addObserver(of:for:using:)` method. The ``NotificationCenter/MainActorMessage/Subject`` of this message type is ``UserDefaults``. This message interoperates with the notification ``UserDefaults/sizeLimitExceededNotification``. The system notifies observers of the message when the ``NotificationCenter`` posts the notification. Similarly, the system notifies observers of the notification when it posts the message.

Members (3)

static · iOS 26.0+

makeMessage

TypeScript
static makeMessage(notification: Notification): Promise<(UserDefaults_SizeLimitExceededMessage) | null>
Swift declaration
@MainActor static func makeMessage(_ notification: Notification) -> UserDefaults.SizeLimitExceededMessage?

Converts a posted notification into this main actor message type for any observers. To implement this method in your own `MainActorMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message. - Parameter notification: The posted ``Notification``. - Returns: The converted `MainActorMessage` or `nil` if conversion is not possible.

get · iOS 26.0+

name

TypeScript
static get nameValue(): NSNotification_Name
Swift declaration
static var name: Notification.Name { get }

A optional name corresponding to this type, used to interoperate with notification posters and observers.

init · iOS 26.0+

init

TypeScript
static init(): UserDefaults_SizeLimitExceededMessage
Swift declaration
init()

Creates a message when the user defaults database of a tvOS app exceeds its maximum size.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →