Language

UNNotificationAttachment.FromIdentifier Method

Definition

Overloads

Name Description
FromIdentifier(String, NSUrl, NSDictionary, NSError)

Creates and returns a new notification attachment with the supplied identifier, url, options, and options.

FromIdentifier(String, NSUrl, UNNotificationAttachmentOptions, NSError)

Creates a new attachment for a notification from the file at the specified url.

FromIdentifier(String, NSUrl, NSDictionary, NSError)

Creates and returns a new notification attachment with the supplied identifier, url, options, and options.

[Foundation.Export("attachmentWithIdentifier:URL:options:error:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static UserNotifications.UNNotificationAttachment? FromIdentifier(string identifier, Foundation.NSUrl url, Foundation.NSDictionary? options, out Foundation.NSError? error);
[<Foundation.Export("attachmentWithIdentifier:URL:options:error:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member FromIdentifier : string * Foundation.NSUrl * Foundation.NSDictionary * NSError -> UserNotifications.UNNotificationAttachment

Parameters

identifier
String

The unique attachment identifier.

url
NSUrl

The location of the attachment.

options
NSDictionary

A dictionary of attachment options, such as clipping rectangles, animation frame numbers, and so on.

This parameter can be null.

error
NSError

A location to which errors will be written.

This parameter can be null.

Returns

A new notification attachmen.

Attributes

Applies to

FromIdentifier(String, NSUrl, UNNotificationAttachmentOptions, NSError)

Creates a new attachment for a notification from the file at the specified url.

public static UserNotifications.UNNotificationAttachment? FromIdentifier(string identifier, Foundation.NSUrl url, UserNotifications.UNNotificationAttachmentOptions attachmentOptions, out Foundation.NSError? error);
public static UserNotifications.UNNotificationAttachment? FromIdentifier(string identifier, Foundation.NSUrl url, UserNotifications.UNNotificationAttachmentOptions? attachmentOptions, out Foundation.NSError? error);
static member FromIdentifier : string * Foundation.NSUrl * UserNotifications.UNNotificationAttachmentOptions * NSError -> UserNotifications.UNNotificationAttachment

Parameters

identifier
String

The unique identifier for the attachment, or an empty string to have one generated automatically.

url
NSUrl

The URL of the file to attach.

attachmentOptions
UNNotificationAttachmentOptions

Options that describe how the attachment should be handled, or null to use the default options.

error
NSError

On failure, contains the error that describes why the attachment could not be created.

Returns

A new UNNotificationAttachment, or null if the attachment could not be created.

Applies to