Skip to content

Commit

Permalink
Merge branch 'rg/task/SDK-3755-add-icon-name-on-mega-notification' in…
Browse files Browse the repository at this point in the history
…to 'develop'

SDK-3755: iOS Bindings - Add iconName on MEGANotification

Closes SDK-3755

See merge request sdk/sdk!5385
  • Loading branch information
rgmez committed Mar 18, 2024
2 parents 60e1f13 + 58ceda7 commit 1809f07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
4 changes: 4 additions & 0 deletions bindings/ios/MEGANotification.mm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ - (nullable NSString *)imagePath {
return self.megaNotification ? [[NSString alloc] initWithUTF8String:self.megaNotification->getImagePath()] : nil;
}

- (nullable NSString *)iconName {
return self.megaNotification ? [[NSString alloc] initWithUTF8String:self.megaNotification->getIconName()] : nil;
}

- (nullable NSDate *)startDate {
return self.megaNotification ? [[NSDate alloc] initWithTimeIntervalSince1970:self.megaNotification->getStart()] : nil;
}
Expand Down
25 changes: 7 additions & 18 deletions bindings/ios/include/MEGANotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,43 +50,38 @@ NS_ASSUME_NONNULL_BEGIN
/**
* @brief Get the title of this notification.
*
* The caller does not take the ownership of the object.
* The object is valid as long as the current MEGANotification object is valid too.
*
* @return the title of this notification.
*/
@property (nonatomic, readonly, nullable) NSString *title;

/**
* @brief Get the description for this notification.
*
* The caller does not take the ownership of the object.
* The object is valid as long as the current MEGANotification object is valid too.
*
* @return the description for this notification.
*/
@property (nonatomic, readonly, nullable) NSString *description;

/**
* @brief Get the image name for this notification.
*
* The caller does not take the ownership of the object.
* The object is valid as long as the current MEGANotification object is valid too.
*
* @return the image name for this notification.
*/
@property (nonatomic, readonly, nullable) NSString *imageName;

/**
* @brief Get the default static path of the image associated with this notification.
*
* The caller does not take the ownership of the object.
* The object is valid as long as the current MEGANotification object is valid too.
*
* @return the default static path of the image associated with this notification.
*/
@property (nonatomic, readonly, nullable) NSString *imagePath;

/**
* @brief Get the name of the icon for this notification.
*
* @return the name of the icon for this notification.
*/
@property (nonatomic, readonly, nullable) NSString *iconName;

/**
* @brief Get the date of when the notification became available to the user.
*
Expand All @@ -112,9 +107,6 @@ NS_ASSUME_NONNULL_BEGIN
* @brief Get metadata for the first call to action, represented by attributes "link" and "text",
* and their corresponding values.
*
* The caller does not take the ownership of the returned object.
* The returned object is valid as long as the current MEGANotification object is valid too.
*
* @return metadata for the first call to action.
*/
@property (nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *firstCallToAction;
Expand All @@ -123,9 +115,6 @@ NS_ASSUME_NONNULL_BEGIN
* @brief Get metadata for the second call-to-action, represented by attributes "link" and "text",
* and their corresponding values.
*
* The caller does not take the ownership of the returned object.
* The returned object is valid as long as the current MegaNotification object is valid too.
*
* @return metadata for the second call-to-action.
*/
@property (nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *secondCallToAction;
Expand Down

0 comments on commit 1809f07

Please sign in to comment.