Class UNNotificationSound

All Implemented Interfaces:
NSCoding, NSObjectProtocol, NSSecureCoding, ObjCProtocol

public class UNNotificationSound
extends NSObject
implements NSSecureCoding
Since:
Available in iOS 10.0 and later.
  • Constructor Details

    • UNNotificationSound

      protected UNNotificationSound()
    • UNNotificationSound

      protected UNNotificationSound​(NSObject.Handle h, long handle)
    • UNNotificationSound

      protected UNNotificationSound​(NSObject.SkipInit skipInit)
    • UNNotificationSound

      public UNNotificationSound​(NSCoder coder)
  • Method Details

    • getDefaultSound

      public static UNNotificationSound getDefaultSound()
    • getDefaultRingtoneSound

      public static UNNotificationSound getDefaultRingtoneSound()
      Since:
      Available in iOS 15.2 and later.
    • getDefaultCriticalSound

      public static UNNotificationSound getDefaultCriticalSound()
      Since:
      Available in iOS 12.0 and later.
    • supportsSecureCoding

      public static boolean supportsSecureCoding()
    • getDefaultCriticalSound

      public static UNNotificationSound getDefaultCriticalSound​(float volume)
      Since:
      Available in iOS 12.0 and later.
    • soundNamed

      public static UNNotificationSound soundNamed​(String name)
    • ringtoneSoundNamed

      public static UNNotificationSound ringtoneSoundNamed​(String name)
      Since:
      Available in iOS 15.2 and later.
    • getCriticalSound

      public static UNNotificationSound getCriticalSound​(String name)
      Since:
      Available in iOS 12.0 and later.
    • getCriticalSound

      public static UNNotificationSound getCriticalSound​(String name, float volume)
      Since:
      Available in iOS 12.0 and later.
    • encode

      public void encode​(NSCoder coder)
      Specified by:
      encode in interface NSCoding
    • init

      protected long init​(NSCoder coder)