UNNotificationSound.GetCriticalSound Method

Definition

Overloads

GetCriticalSound(String)

Creates and returns a default critical notification sound.

GetCriticalSound(String, Single)

Creates and returns a critical notification sound.

GetCriticalSound(String)

Creates and returns a default critical notification sound.

[Foundation.Export("criticalSoundNamed:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static UserNotifications.UNNotificationSound GetCriticalSound (string name);
static member GetCriticalSound : string -> UserNotifications.UNNotificationSound

Parameters

name
String

The name of the file that contains the sound to play.

Returns

The default critical notification sound.

Attributes

Applies to

GetCriticalSound(String, Single)

Creates and returns a critical notification sound.

[Foundation.Export("criticalSoundNamed:withAudioVolume:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static UserNotifications.UNNotificationSound GetCriticalSound (string name, float volume);
static member GetCriticalSound : string * single -> UserNotifications.UNNotificationSound

Parameters

name
String

The name of the file that contains the sound to play.

volume
Single

The volume at which to play the alert sound.

Returns

The critical notification sound.

Attributes

Applies to