Loading...
Searching...
No Matches

Class is used for working with the notifications and storing its data. More...

#include <com/navigine/idl/objc/NCNotification.h>

Inherits NSObject.

Properties

int32_t id
 notification's unique identifier.
 
NSString * title
 notification's title.
 
NSString * content
 notification's content.
 
NSString * imageUrl
 notification's image url if specified.
 

Detailed Description

Class is used for working with the notifications and storing its data.

Referenced from: NotificationListener.

Definition at line 19 of file NCNotification.h.

Property Documentation

◆ content

- (NSString*) content
readnonatomicassign

notification's content.

Swift code snippet:

// Get notification content
let content = notification.content
print("Notification content: \‍(content)")

Objective C code snippet:

// Get notification content
NSString *content = notification.content;
NSLog(@"Notification content: %@", content);

Definition at line 61 of file NCNotification.h.

◆ id

- (int32_t) id
readnonatomicassign

notification's unique identifier.

Swift code snippet:

// Get notification ID
let id = notification.id
print("Notification ID: \‍(id)")

Objective C code snippet:

// Get notification ID
int32_t id = notification.id;
NSLog(@"Notification ID: %d", id);

Definition at line 33 of file NCNotification.h.

◆ imageUrl

- (NSString*) imageUrl
readnonatomicassign

notification's image url if specified.

Swift code snippet:

// Get notification image URL
let imageUrl = notification.imageUrl
if let imageUrl = imageUrl, !imageUrl.isEmpty {
print("Notification image URL: \‍(imageUrl)")
} else {
print("Notification has no image URL")
}

Objective C code snippet:

// Get notification image URL
NSString *imageUrl = notification.imageUrl;
if (imageUrl != nil && imageUrl.length > 0) {
NSLog(@"Notification image URL: %@", imageUrl);
} else {
NSLog(@"Notification has no image URL");
}

Definition at line 75 of file NCNotification.h.

◆ title

- (NSString*) title
readnonatomicassign

notification's title.

Swift code snippet:

// Get notification title
let title = notification.title
print("Notification title: \‍(title)")

Objective C code snippet:

// Get notification title
NSString *title = notification.title;
NSLog(@"Notification title: %@", title);

Definition at line 47 of file NCNotification.h.


The documentation for this class was generated from the following file: