Skip to content

Commit

Permalink
feat: iOS | Click on Notification Action
Browse files Browse the repository at this point in the history
Update the OSFirebaseMessagingLib and OSLocalNotificationsLib to add reaction to a Notification Action click.
  • Loading branch information
OS-ricardomoreirasilva committed May 2, 2023
1 parent c01ccca commit f44e89b
Show file tree
Hide file tree
Showing 19 changed files with 108 additions and 105 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ The changes documented here do not include those from the original repository.
## 02-05-2023
- Feat: [Android] Add action buttons (https://outsystemsrd.atlassian.net/browse/RMET-2387).

## 28-04-2023
- Feat: [ıOS] React to a notification action click (https://outsystemsrd.atlassian.net/browse/RMET-2383).

## 24-04-2023
- Feat: [iOS] React to a triggered notification with a custom action configured (https://outsystemsrd.atlassian.net/browse/RMET-2382).

Expand Down
10 changes: 5 additions & 5 deletions src/ios/frameworks/OSFirebaseMessagingLib.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>OSFirebaseMessagingLib.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OSFirebaseMessagingLib.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public enum FirebaseEventType {
public enum FirebaseNotificationType {
case defaultNotification
case silentNotification
case pushDataMessageNotification
public static func == (a: OSFirebaseMessagingLib.FirebaseNotificationType, b: OSFirebaseMessagingLib.FirebaseNotificationType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
Expand Down Expand Up @@ -240,19 +241,6 @@ extension OSFirebaseMessagingLib.NotificationManager : OSFirebaseMessagingLib.No
@objc override dynamic public init()
@objc deinit
}
extension OSLocalNotificationsLib.OSLCNOActionTextField : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOActionType : Swift.Decodable {
}
extension OSLocalNotificationsLib.OSLCNOActionEvent : Swift.Decodable {
}
extension OSLocalNotificationsLib.OSLCNORouteData : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOAction : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSFirebaseMessagingLib.OSFCMExtraData {
@nonobjc public class func fetchRequest() -> CoreData.NSFetchRequest<OSFirebaseMessagingLib.OSFCMExtraData>
@objc @NSManaged dynamic public var key: Swift.String? {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public enum FirebaseEventType {
public enum FirebaseNotificationType {
case defaultNotification
case silentNotification
case pushDataMessageNotification
public static func == (a: OSFirebaseMessagingLib.FirebaseNotificationType, b: OSFirebaseMessagingLib.FirebaseNotificationType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
Expand Down Expand Up @@ -240,19 +241,6 @@ extension OSFirebaseMessagingLib.NotificationManager : OSFirebaseMessagingLib.No
@objc override dynamic public init()
@objc deinit
}
extension OSLocalNotificationsLib.OSLCNOActionTextField : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOActionType : Swift.Decodable {
}
extension OSLocalNotificationsLib.OSLCNOActionEvent : Swift.Decodable {
}
extension OSLocalNotificationsLib.OSLCNORouteData : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOAction : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSFirebaseMessagingLib.OSFCMExtraData {
@nonobjc public class func fetchRequest() -> CoreData.NSFetchRequest<OSFirebaseMessagingLib.OSFCMExtraData>
@objc @NSManaged dynamic public var key: Swift.String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public enum FirebaseEventType {
public enum FirebaseNotificationType {
case defaultNotification
case silentNotification
case pushDataMessageNotification
public static func == (a: OSFirebaseMessagingLib.FirebaseNotificationType, b: OSFirebaseMessagingLib.FirebaseNotificationType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
Expand Down Expand Up @@ -240,19 +241,6 @@ extension OSFirebaseMessagingLib.NotificationManager : OSFirebaseMessagingLib.No
@objc override dynamic public init()
@objc deinit
}
extension OSLocalNotificationsLib.OSLCNOActionTextField : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOActionType : Swift.Decodable {
}
extension OSLocalNotificationsLib.OSLCNOActionEvent : Swift.Decodable {
}
extension OSLocalNotificationsLib.OSLCNORouteData : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOAction : Swift.Decodable {
public init(from decoder: Swift.Decoder) throws
}
extension OSFirebaseMessagingLib.OSFCMExtraData {
@nonobjc public class func fetchRequest() -> CoreData.NSFetchRequest<OSFirebaseMessagingLib.OSFCMExtraData>
@objc @NSManaged dynamic public var key: Swift.String? {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
</data>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data>
1a5CgiKAxpE8Zkr0GAmgdxatIkw=
73gCHsciEYxnxy/32Ty9GQe4/P4=
</data>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<data>
aUATPuzHZddH517WeIZYlGwK/Ts=
477qcbp7t/BNL8JHYUN+mT/XYZA=
</data>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data>
TP3Ky76PnNed5p/pVLBNdmqsUHA=
</data>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data>
BvfG6WN5PZCM9nlKnru5ejlBI3s=
BJq2XaEHOaAYIwUsRJ1rjq8ACEE=
</data>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<data>
wGtPIZA9/hkiC5tXw9Z30LfnJIc=
oZI1DJM+sA7bjtv3oSZYvF4OfuY=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -88,14 +88,14 @@
<dict>
<key>hash2</key>
<data>
/5pmf8YZQSI5+aS7Mg7hwA36lxxMiQ+xQulRt+pQ5zI=
ehl5xDMCtdVFoOgPXfsm5S82FubVaDXpK/sXexbmejs=
</data>
</dict>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
qnfQ7+6bCqBFAkzuhs2MEvFWcwI2Dt8VQpoFndwd71U=
+Ii5xlLGXcWOmDHCVourno9PqltX6o0AdlEQ5IwUW1c=
</data>
</dict>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
Expand All @@ -109,14 +109,14 @@
<dict>
<key>hash2</key>
<data>
IfmpXUDuiQPyT0Zxndx7QHyI7cZ03OKoEH9ndydg0Gw=
ggYF2t7hebwHEslTwHHhaYPE7n4NtoE8x54+8f75QZs=
</data>
</dict>
<key>Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
hntL8n6IN3IO4p1S08FUpOgGxEAl5U1JhjEZfE5Pnw4=
nyOWIW1nYNyG8D21FjW16VseC6pZq7YYlkK4hVU3roQ=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OSLocalNotificationsLib.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>OSLocalNotificationsLib.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ public protocol OSLCNOActionDelegate : AnyObject {
func triggerNotification(with title: Swift.String, _ body: Swift.String?, _ badge: Swift.Int?, _ sound: OSLocalNotificationsLib.OSLCNOSound?, _ actions: [OSLocalNotificationsLib.OSLCNOAction]?) async throws
#endif


#if compiler(>=5.3) && $AsyncAwait
func clearNotificationCategory(with id: Swift.String) async
#endif

}
public struct OSLCNORouteData {
public init(deepLinkScheme: Swift.String, hostName: Swift.String?, parameterData: [Swift.String : Swift.String]?)
}
public struct OSLCNOActionTextField {
public init(placeholder: Swift.String)
}
public enum OSLCNOActionEvent : Swift.String {
public enum OSLCNOActionEvent : Swift.String, Swift.Codable {
case internalRoute
case appRoute
case webRoute
Expand All @@ -44,7 +43,18 @@ public enum OSLCNOActionEvent : Swift.String {
get
}
}
public enum OSLCNOActionType : Swift.String {
public struct OSLCNORouteData : Swift.Codable {
public init(deepLinkScheme: Swift.String, hostName: Swift.String?, parameterData: [Swift.String : Swift.String]?)
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
public struct OSLCNOAction : Swift.Codable {
public let event: OSLocalNotificationsLib.OSLCNOActionEvent
public init(identifier: Swift.String, label: Swift.String, textField: OSLocalNotificationsLib.OSLCNOActionTextField?, type: OSLocalNotificationsLib.OSLCNOActionType, event: OSLocalNotificationsLib.OSLCNOActionEvent, routeData: OSLocalNotificationsLib.OSLCNORouteData)
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
public enum OSLCNOActionType : Swift.String, Swift.Codable {
case standard
case destructive
public init?(rawValue: Swift.String)
Expand All @@ -53,8 +63,10 @@ public enum OSLCNOActionType : Swift.String {
get
}
}
public struct OSLCNOAction {
public init(identifier: Swift.String, label: Swift.String, textField: OSLocalNotificationsLib.OSLCNOActionTextField?, type: OSLocalNotificationsLib.OSLCNOActionType, event: OSLocalNotificationsLib.OSLCNOActionEvent, routeData: OSLocalNotificationsLib.OSLCNORouteData)
public struct OSLCNOActionTextField : Swift.Codable {
public init(placeholder: Swift.String, inputTextKey: Swift.String)
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOError : Swift.Equatable {}
extension OSLocalNotificationsLib.OSLCNOError : Swift.Hashable {}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
</data>
<key>Modules/OSLocalNotificationsLib.swiftmodule/arm64-apple-ios.swiftdoc</key>
<data>
4XaSpSRv51kP+yHNNlhEwW+DoT8=
VatiIgo/NzQCRB3h1O2N4APWtWs=
</data>
<key>Modules/OSLocalNotificationsLib.swiftmodule/arm64-apple-ios.swiftinterface</key>
<data>
7ykZ77hzys+zpjzgzHgcgaeOXiw=
sX5uiuvnWq7F9V+jPTKR/HqSgGI=
</data>
<key>Modules/OSLocalNotificationsLib.swiftmodule/arm64-apple-ios.swiftmodule</key>
<data>
l4/0ctEbjhtJeybHhI5dkbr0UZc=
wOjGdF4T7crnpQI7uTC+Af6I1S8=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -42,21 +42,21 @@
<dict>
<key>hash2</key>
<data>
ixzTnreowsTCXTfuBOli5fCC5JSt5SmaViXGq59Mrwc=
YwAL/egI5qzyvohFZRHthhYjXJFiKQnLa9CIzPmwMv0=
</data>
</dict>
<key>Modules/OSLocalNotificationsLib.swiftmodule/arm64-apple-ios.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
+bkHjJ+OdR+WXk5uW1jfr8N/XkkSTg/jWsTESArrg7E=
tyVajOUdbdoKvZZ35vcjvl4B6Hp4xD3lWpFGSYmy4Ro=
</data>
</dict>
<key>Modules/OSLocalNotificationsLib.swiftmodule/arm64-apple-ios.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
ji8NQQcGSkTTKeeDW30CzxQNqOu8rTMfCuIuRw2vHB4=
qlqAC6nTfQqGnGOeHvVbMIY0Zny95NbmgC8uYo59ySA=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ public protocol OSLCNOActionDelegate : AnyObject {
func triggerNotification(with title: Swift.String, _ body: Swift.String?, _ badge: Swift.Int?, _ sound: OSLocalNotificationsLib.OSLCNOSound?, _ actions: [OSLocalNotificationsLib.OSLCNOAction]?) async throws
#endif


#if compiler(>=5.3) && $AsyncAwait
func clearNotificationCategory(with id: Swift.String) async
#endif

}
public struct OSLCNORouteData {
public init(deepLinkScheme: Swift.String, hostName: Swift.String?, parameterData: [Swift.String : Swift.String]?)
}
public struct OSLCNOActionTextField {
public init(placeholder: Swift.String)
}
public enum OSLCNOActionEvent : Swift.String {
public enum OSLCNOActionEvent : Swift.String, Swift.Codable {
case internalRoute
case appRoute
case webRoute
Expand All @@ -44,7 +43,18 @@ public enum OSLCNOActionEvent : Swift.String {
get
}
}
public enum OSLCNOActionType : Swift.String {
public struct OSLCNORouteData : Swift.Codable {
public init(deepLinkScheme: Swift.String, hostName: Swift.String?, parameterData: [Swift.String : Swift.String]?)
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
public struct OSLCNOAction : Swift.Codable {
public let event: OSLocalNotificationsLib.OSLCNOActionEvent
public init(identifier: Swift.String, label: Swift.String, textField: OSLocalNotificationsLib.OSLCNOActionTextField?, type: OSLocalNotificationsLib.OSLCNOActionType, event: OSLocalNotificationsLib.OSLCNOActionEvent, routeData: OSLocalNotificationsLib.OSLCNORouteData)
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
public enum OSLCNOActionType : Swift.String, Swift.Codable {
case standard
case destructive
public init?(rawValue: Swift.String)
Expand All @@ -53,8 +63,10 @@ public enum OSLCNOActionType : Swift.String {
get
}
}
public struct OSLCNOAction {
public init(identifier: Swift.String, label: Swift.String, textField: OSLocalNotificationsLib.OSLCNOActionTextField?, type: OSLocalNotificationsLib.OSLCNOActionType, event: OSLocalNotificationsLib.OSLCNOActionEvent, routeData: OSLocalNotificationsLib.OSLCNORouteData)
public struct OSLCNOActionTextField : Swift.Codable {
public init(placeholder: Swift.String, inputTextKey: Swift.String)
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
extension OSLocalNotificationsLib.OSLCNOError : Swift.Equatable {}
extension OSLocalNotificationsLib.OSLCNOError : Swift.Hashable {}
Expand Down
Binary file not shown.
Loading

0 comments on commit f44e89b

Please sign in to comment.