A file resource associated with an accessory notification.
`File` represents media content that accompanies a notification, such as icons or attachments.
- Note: The underlying file data is managed by the system and provided only when requested
in the context of an add or modify event.
Members (2)
get · iOS 26.5+
url
TypeScript
get url(): Promise<string>
Swift declaration
var url: URL { get async throws }
The URL of a file on the local device representing this `File`.
This URL is only accessible in the context of a notification addition or modification.
The file should be modified as needed and saved to your container within this interval.
get · iOS 26.5+
type
TypeScript
get type(): _UniformTypeIdentifiers_UTType
Swift declaration
var type: UTType { get }
The type of the file at `url`.
See [Supported File Types](https://developer.apple.com/documentation/usernotifications/unnotificationattachment#Supported-File-Types) for more information and a list of possible file types.