Skip to content

Commit

Permalink
Merge pull request #120 from OutSystems/development
Browse files Browse the repository at this point in the history
RMET-2948 - Prepare to release version `2.4.0`
  • Loading branch information
alexgerardojacinto authored Oct 18, 2024
2 parents a089dd2 + 3b1edc8 commit a103900
Show file tree
Hide file tree
Showing 45 changed files with 9,957 additions and 706 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## [Version 2.4.0]

### Features
- (android) Subscribes and unsubscribes from `appGeneralTopic` - `appIdentifier-general-topic-android` when registering and unregistering the device. (https://outsystemsrd.atlassian.net/browse/RMET-2948).
- (ios) Subscribes and unsubscribes from `appGeneralTopic` - `appIdentifier-general-topic-ios` when registering and unregistering the device. (https://outsystemsrd.atlassian.net/browse/RMET-2947).
- (android) Handle icon and color parameters in setupNotificationBuilder for Android 12+ compatibility.

### Fix
- (ios) `NotificationClickedV2` not being triggered when deep link property is not set (https://outsystemsrd.atlassian.net/browse/RMET-3695).

## [Version 2.3.2]

### Features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.outsystems.firebase.cloudmessaging",
"version": "2.3.2",
"version": "2.4.0",
"description": "Outsystems plugin for Firebase Cloud Messaging",
"keywords": [
"ecosystem:cordova",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin id="com.outsystems.firebase.cloudmessaging" version="2.3.2" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="com.outsystems.firebase.cloudmessaging" version="2.4.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">

<name>OSFirebaseCloudMessaging</name>
<description>Outsystems plugin for Firebase Cloud Messaging</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {

flow?.collect {
if (it == OSFCMPermissionEvents.Granted) {
if (controller.registerDevice()) {
if (controller.registerDevice(this.getPackageAppName())) {
sendSuccess(callbackContext)
} else {
sendError(callbackContext, FirebaseMessagingError.REGISTRATION_ERROR)
Expand All @@ -287,7 +287,7 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {
}

private suspend fun unregisterDevice(callbackContext: CallbackContext) {
if (controller.unregisterDevice()) {
if (controller.unregisterDevice(this.getPackageAppName())) {
sendSuccess(callbackContext)
} else {
sendError(callbackContext, FirebaseMessagingError.UNREGISTRATION_ERROR)
Expand All @@ -300,8 +300,20 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {
val text = args.get(2).toString()
val channelName = args.get(3).toString()
val channelDescription = args.get(4).toString()
val color = args.get(5).toString()
val icon = args.get(6).toString()

val result = controller.sendLocalNotification(
number = badge,
title = title,
text = text,
image = null,
color = color,
icon = icon,
channelName = channelName,
channelDescription = channelDescription
)

val result = controller.sendLocalNotification(badge, title, text, null, channelName, channelDescription)
if (result.first) {
sendSuccess(callbackContext)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ apply plugin: 'kotlin-kapt'
dependencies {
implementation("com.github.outsystems:oscore-android:1.2.0@aar")
implementation("com.github.outsystems:oscordova-android:2.0.1@aar")
implementation("com.github.outsystems:osfirebasemessaging-android:1.2.2@aar")
implementation("com.github.outsystems:oslocalnotifications-android:1.0.0@aar")
implementation("com.github.outsystems:osfirebasemessaging-android:1.3.0@aar")
implementation("com.github.outsystems:oslocalnotifications-android:1.1.0@aar")

implementation("com.google.code.gson:gson:2.8.9")

Expand Down
2 changes: 2 additions & 0 deletions src/ios/OSFirebaseCloudMessaging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class OSFirebaseCloudMessaging: CDVPlugin {
do {
if try await self.plugin?.requestAuthorisation() == true {
try await self.plugin?.subscribe(toTopic: .general)
try await self.plugin?.subscribe(toTopic: .appGeneral)
self.sendSuccess(callbackId: command.callbackId)
} else {
self.send(error: .notificationsPermissionsDeniedError, callbackId: command.callbackId)
Expand Down Expand Up @@ -92,6 +93,7 @@ class OSFirebaseCloudMessaging: CDVPlugin {

do {
try await self.plugin?.unsubscribe(fromTopic: .general)
try await self.plugin?.unsubscribe(fromTopic: .appGeneral)
self.sendSuccess(callbackId: command.callbackId)
} catch {
self.send(error: .unregistrationError, callbackId: command.callbackId)
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Info.plist</key>
<data>
sWwyshmz1mWW7d1lq1OqrBhF1ME=
+NPtEF00tkaiswcYfjxGkCEuj38=
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.abi.json</key>
<data>
2CWIvT7UAKkt/fSMphu8dy4QPM8=
Ok23OPHobqXCWwH4Bevs4+coIjw=
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
<data>
hyn3DpEjlFQjd+g7P5Ui5CDjifo=
6m6Bn6TpoTdjK0+TPp9SYdalpdY=
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.swiftdoc</key>
<data>
V8uNtqddJUuSKfKUSTKbaZwcVrk=
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.swiftinterface</key>
<data>
hyn3DpEjlFQjd+g7P5Ui5CDjifo=
6m6Bn6TpoTdjK0+TPp9SYdalpdY=
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/module.modulemap</key>
<data>
Expand All @@ -50,47 +50,47 @@
</data>
<key>ios-arm64/OSFirebaseMessagingLib.framework/OSFirebaseMessagingLib</key>
<data>
/YHG/wpZF+amBml9uPKr2fHTLko=
RWsUWzbltUii/0zfvYNUScJAAU4=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Headers/OSFirebaseMessagingLib-Swift.h</key>
<data>
ts1McwKvSuMgR8BrTXSHICwEXnU=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Info.plist</key>
<data>
IXr7wYcw9VP+61SmKVG4G0gveU8=
6tuY1MnznM1CqgkQtTzOQ8xiFOw=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<data>
4x/sBYZWTV2bEygjFvwjced1lYM=
U+R/eFnBTyTX0XeLs9VMZJxccZA=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<data>
C2SUY+gQuOJLdEQx1965Y7pI22g=
BQ7WLTs+e0DroYGuORcHFNZohaI=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<data>
biaZjRXkCFnaR005AmHcWptS3j8=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data>
C2SUY+gQuOJLdEQx1965Y7pI22g=
BQ7WLTs+e0DroYGuORcHFNZohaI=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<data>
4x/sBYZWTV2bEygjFvwjced1lYM=
U+R/eFnBTyTX0XeLs9VMZJxccZA=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<data>
W49YTdboAsTtkYNnXl95fk1jSTw=
gJWYlMdUVB09BYPXNAT/djKjRYE=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data>
1dumSR7gkx2E1ZRPo2Eq6CdabAQ=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data>
W49YTdboAsTtkYNnXl95fk1jSTw=
gJWYlMdUVB09BYPXNAT/djKjRYE=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/module.modulemap</key>
<data>
Expand All @@ -114,11 +114,11 @@
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/OSFirebaseMessagingLib</key>
<data>
W467EZcKOy1qlPzeTA0U5K+4BOo=
MuEPCgBq5vqVwd3EhDlYeExLlO8=
</data>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/_CodeSignature/CodeResources</key>
<data>
WXiuG1zs12HkGmZwpHi/mul6hfM=
/17Pcbl/PxWmr6O78qzu+hKW/sU=
</data>
</dict>
<key>files2</key>
Expand All @@ -138,33 +138,33 @@
<dict>
<key>hash</key>
<data>
sWwyshmz1mWW7d1lq1OqrBhF1ME=
+NPtEF00tkaiswcYfjxGkCEuj38=
</data>
<key>hash2</key>
<data>
Zp0tsqMu1xtk206NPQloM4xlhZfGaedbmjOVQlBG3F8=
cRAIpb5Qk7TffT1p80HxAf3XOhWlJQSxBNYKr2/j1hs=
</data>
</dict>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.abi.json</key>
<dict>
<key>hash</key>
<data>
2CWIvT7UAKkt/fSMphu8dy4QPM8=
Ok23OPHobqXCWwH4Bevs4+coIjw=
</data>
<key>hash2</key>
<data>
Po9tSTGRxUSruOOeFsAaUkkqR4ptj0cucQUVuYpmAAQ=
yCgOh8kTMjxwW94Z4lryKOq0Fo8i8uTxNwV4HQR7XD4=
</data>
</dict>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
<dict>
<key>hash</key>
<data>
hyn3DpEjlFQjd+g7P5Ui5CDjifo=
6m6Bn6TpoTdjK0+TPp9SYdalpdY=
</data>
<key>hash2</key>
<data>
EVsqyEN3C7O6YuCk3nJNG4mY6GbJXT50P0HloHGXsg8=
CajSY0dIMGDUyzM5jwiBvi/jMsaDD+ENvDvVbK7n8bA=
</data>
</dict>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios.swiftdoc</key>
Expand All @@ -182,11 +182,11 @@
<dict>
<key>hash</key>
<data>
hyn3DpEjlFQjd+g7P5Ui5CDjifo=
6m6Bn6TpoTdjK0+TPp9SYdalpdY=
</data>
<key>hash2</key>
<data>
EVsqyEN3C7O6YuCk3nJNG4mY6GbJXT50P0HloHGXsg8=
CajSY0dIMGDUyzM5jwiBvi/jMsaDD+ENvDvVbK7n8bA=
</data>
</dict>
<key>ios-arm64/OSFirebaseMessagingLib.framework/Modules/module.modulemap</key>
Expand Down Expand Up @@ -248,11 +248,11 @@
<dict>
<key>hash</key>
<data>
/YHG/wpZF+amBml9uPKr2fHTLko=
RWsUWzbltUii/0zfvYNUScJAAU4=
</data>
<key>hash2</key>
<data>
JwXgQc1lh+CUVziyxTwblyX9n7uhPw9ze5m+/BXS+nE=
hzI73bZ/Wl1xLOT7m0dhvF2DcnKbSd2dgRoLaQ7Yqk0=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Headers/OSFirebaseMessagingLib-Swift.h</key>
Expand All @@ -270,33 +270,33 @@
<dict>
<key>hash</key>
<data>
IXr7wYcw9VP+61SmKVG4G0gveU8=
6tuY1MnznM1CqgkQtTzOQ8xiFOw=
</data>
<key>hash2</key>
<data>
+NBcKFrRNqlQSmG3Et0c/3Tv9Jr/2k2LuciTpLR3fzY=
27KZ0fxFqc4nryww92nPLDLobDwwJ4LBsUJfvgLz7EU=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash</key>
<data>
4x/sBYZWTV2bEygjFvwjced1lYM=
U+R/eFnBTyTX0XeLs9VMZJxccZA=
</data>
<key>hash2</key>
<data>
HGjBodWRrfRUCbZiOkmF7SvQ6G1aS/3ph6oXO9wHAoc=
Ol4q47sHm94c8JQju3t1vE1td5MVX5uHhbPKR+XrB4E=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash</key>
<data>
C2SUY+gQuOJLdEQx1965Y7pI22g=
BQ7WLTs+e0DroYGuORcHFNZohaI=
</data>
<key>hash2</key>
<data>
xRPA4W5UW904MUO3WbU7zsmV6dZ4k/xet1Gs155/EkQ=
Ak7izsD4xNeGH1mu3797qVuX7CWfD9tVmEIWlr1j0pI=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
Expand All @@ -314,33 +314,33 @@
<dict>
<key>hash</key>
<data>
C2SUY+gQuOJLdEQx1965Y7pI22g=
BQ7WLTs+e0DroYGuORcHFNZohaI=
</data>
<key>hash2</key>
<data>
xRPA4W5UW904MUO3WbU7zsmV6dZ4k/xet1Gs155/EkQ=
Ak7izsD4xNeGH1mu3797qVuX7CWfD9tVmEIWlr1j0pI=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash</key>
<data>
4x/sBYZWTV2bEygjFvwjced1lYM=
U+R/eFnBTyTX0XeLs9VMZJxccZA=
</data>
<key>hash2</key>
<data>
HGjBodWRrfRUCbZiOkmF7SvQ6G1aS/3ph6oXO9wHAoc=
Ol4q47sHm94c8JQju3t1vE1td5MVX5uHhbPKR+XrB4E=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash</key>
<data>
W49YTdboAsTtkYNnXl95fk1jSTw=
gJWYlMdUVB09BYPXNAT/djKjRYE=
</data>
<key>hash2</key>
<data>
j7W0WCHNXxNMIOVUU0NRNlAUxInPYbLhQmnhQ1CaENM=
gZZJpV91j8uIqN/B/7WMx3NMpQHhKB9913aMv9yIDxQ=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/OSFirebaseMessagingLib.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
Expand All @@ -358,11 +358,11 @@
<dict>
<key>hash</key>
<data>
W49YTdboAsTtkYNnXl95fk1jSTw=
gJWYlMdUVB09BYPXNAT/djKjRYE=
</data>
<key>hash2</key>
<data>
j7W0WCHNXxNMIOVUU0NRNlAUxInPYbLhQmnhQ1CaENM=
gZZJpV91j8uIqN/B/7WMx3NMpQHhKB9913aMv9yIDxQ=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/Modules/module.modulemap</key>
Expand Down Expand Up @@ -424,22 +424,22 @@
<dict>
<key>hash</key>
<data>
W467EZcKOy1qlPzeTA0U5K+4BOo=
MuEPCgBq5vqVwd3EhDlYeExLlO8=
</data>
<key>hash2</key>
<data>
TICbw/9f6tTKS5Ah6+MXEndn9bAASrj7Wi9IAuFGBs0=
YAB6fBH8vUVIt63ZssAF+peu/g2MMyG7s868p09SJy0=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/OSFirebaseMessagingLib.framework/_CodeSignature/CodeResources</key>
<dict>
<key>hash</key>
<data>
WXiuG1zs12HkGmZwpHi/mul6hfM=
/17Pcbl/PxWmr6O78qzu+hKW/sU=
</data>
<key>hash2</key>
<data>
nzvU6hsqjuCyf9etznluLTdmhWzYQShLmkzN0hFuujw=
DlNGmDaal1ggmJtjyP7ySpCZSGLdFYCAsHgh5OiPPwE=
</data>
</dict>
</dict>
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit a103900

Please sign in to comment.