From 9235721093dffcdf38e156f6ff266570bde0d5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Go=CC=81mez?= Date: Fri, 15 Mar 2024 14:52:01 +0100 Subject: [PATCH 1/2] SDK-3755: iOS Bindings - Add iconName on MEGANotification --- bindings/ios/MEGANotification.mm | 4 ++++ bindings/ios/include/MEGANotification.h | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/bindings/ios/MEGANotification.mm b/bindings/ios/MEGANotification.mm index 41bfa218f5..ed3d8b6387 100644 --- a/bindings/ios/MEGANotification.mm +++ b/bindings/ios/MEGANotification.mm @@ -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; } diff --git a/bindings/ios/include/MEGANotification.h b/bindings/ios/include/MEGANotification.h index 580e202ebd..fe6f8d4cef 100644 --- a/bindings/ios/include/MEGANotification.h +++ b/bindings/ios/include/MEGANotification.h @@ -87,6 +87,16 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, readonly, nullable) NSString *imagePath; +/** + * @brief Get the name of the icon 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 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. * From 3c3af3107f72bce170e01e6c03ff61f46d81f0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Go=CC=81mez?= Date: Mon, 18 Mar 2024 09:35:25 +0100 Subject: [PATCH 2/2] remove the C++ code documentation not needed for Obj-C binding --- bindings/ios/include/MEGANotification.h | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/bindings/ios/include/MEGANotification.h b/bindings/ios/include/MEGANotification.h index fe6f8d4cef..445fd53457 100644 --- a/bindings/ios/include/MEGANotification.h +++ b/bindings/ios/include/MEGANotification.h @@ -50,9 +50,6 @@ 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; @@ -60,9 +57,6 @@ NS_ASSUME_NONNULL_BEGIN /** * @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; @@ -70,9 +64,6 @@ NS_ASSUME_NONNULL_BEGIN /** * @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; @@ -80,9 +71,6 @@ NS_ASSUME_NONNULL_BEGIN /** * @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; @@ -90,9 +78,6 @@ NS_ASSUME_NONNULL_BEGIN /** * @brief Get the name of the icon 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 name of the icon for this notification. */ @property (nonatomic, readonly, nullable) NSString *iconName; @@ -122,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 *firstCallToAction; @@ -133,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 *secondCallToAction;