UANotificationContent

@interface UANotificationContent : NSObject

Clone of UNNotificationContent for iOS 8-9 support. Contains convenient accessors to the notification’s content.

  • Alert title

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *alertTitle;

    Swift

    var alertTitle: String? { get }
  • Alert body

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *alertBody;

    Swift

    var alertBody: String? { get }
  • Sound file name

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *sound;

    Swift

    var sound: String? { get }
  • Badge number

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSNumber *badge;

    Swift

    var badge: NSNumber? { get }
  • Content available

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSNumber *contentAvailable;

    Swift

    var contentAvailable: NSNumber? { get }
  • Summary argument

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *summaryArgument;

    Swift

    var summaryArgument: String? { get }
  • Summary argument count

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSNumber *summaryArgumentCount;

    Swift

    var summaryArgumentCount: NSNumber? { get }
  • Thread identifier

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *threadIdentifier;

    Swift

    var threadIdentifier: String? { get }
  • Category

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *categoryIdentifier;

    Swift

    var categoryIdentifier: String? { get }
  • Launch image file name

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *launchImage;

    Swift

    var launchImage: String? { get }
  • Localization keys

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSDictionary *localizationKeys;

    Swift

    var localizationKeys: [AnyHashable : Any]? { get }
  • Notification info dictionary used to generate the UANotification.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSDictionary *_Nonnull notificationInfo;

    Swift

    var notificationInfo: [AnyHashable : Any] { get }
  • UNNotification used to generate the UANotification. This will be nil on iOS versions prior to 10.0, or when receiving silent, content-available pushes in the background.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) UNNotification *notification;

    Swift

    var notification: UNNotification? { get }
  • Parses the raw notification dictionary into a UANotification.

    Declaration

    Objective-C

    + (nonnull instancetype)notificationWithNotificationInfo:
        (nonnull NSDictionary *)notificationInfo;

    Swift

    class func notification(withNotificationInfo notificationInfo: [AnyHashable : Any]) -> Self

    Parameters

    notificationInfo

    The raw notification dictionary.

    Return Value

    UANotification instance

  • Converts a UNNotification into a UANotification.

    Declaration

    Objective-C

    + (nonnull instancetype)notificationWithUNNotification:
        (nonnull UNNotification *)notification;

    Swift

    class func notification(with notification: UNNotification) -> Self

    Parameters

    notification

    the UNNotification instance to be converted.

    Return Value

    UANotification instance