Skip to content

Commit 2c2ab96

Browse files
kushCTAnush-Shand
andauthored
Release 3.1.1 (#443)
* Fix for Push notification Clicked twice in killed state (#442) * Fix for CleverTapPushNotificationClicked getting triggered twice in killed state * Updated changelog and versioning * chore(3.1.1) - Updates android versions * Updated changelog title * chore(3.1.1) - Updates package-lock.json --------- Co-authored-by: anush <[email protected]>
1 parent d0ed9bf commit 2c2ab96

File tree

8 files changed

+14
-25
lines changed

8 files changed

+14
-25
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
==========
33

4+
Version 3.1.1 *(6 November 2024)*
5+
-------------------------------------------
6+
**Bug Fixes**
7+
8+
* **[iOS Platform]**
9+
* Fixes a bug where the push notification callback was getting triggered twice in killed state.
10+
411
Version 3.1.0 *(25 October 2024)*
512
-------------------------------------------
613
**What's new**

Example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ android {
3535
defaultConfig {
3636
minSdkVersion 19
3737
targetSdkVersion 34
38-
versionCode 310
39-
versionName "3.1.0"
38+
versionCode 311
39+
versionName "3.1.1"
4040
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
4141
}
4242

ios/CleverTapReact/CleverTapReactManager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
- (void)setDelegates:(CleverTap *)cleverTapInstance;
1111

1212
@property NSString *launchDeepLink;
13-
@property(nonatomic, strong) NSDictionary *pendingPushNotificationExtras;
1413

1514
@end

ios/CleverTapReact/CleverTapReactManager.mm

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ + (instancetype)sharedInstance {
3838
- (instancetype)init {
3939
self = [super init];
4040
if (self) {
41-
42-
[[NSNotificationCenter defaultCenter] addObserver:self
43-
selector:@selector(handleContentDidAppearNotification:)
44-
name:RCTContentDidAppearNotification
45-
object:nil];
4641
CleverTap *clevertap = [CleverTap sharedInstance];
4742
[self setDelegates:clevertap];
4843
}
@@ -63,7 +58,6 @@ - (void)setDelegates:(CleverTap *)cleverTapInstance {
6358
- (void)applicationDidLaunchWithOptions:(NSDictionary *)options {
6459
NSDictionary *notification = [options valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
6560
if (notification){
66-
self.pendingPushNotificationExtras = notification;
6761
if (notification[@"wzrk_dl"]) {
6862
self.launchDeepLink = notification[@"wzrk_dl"];
6963
RCTLogInfo(@"CleverTapReact: setting launch deeplink: %@", self.launchDeepLink);
@@ -171,15 +165,4 @@ - (void)onPushPermissionResponse:(BOOL)accepted {
171165
[self postNotificationWithName:kCleverTapPushPermissionResponseReceived andBody:body];
172166
}
173167

174-
- (void)handleContentDidAppearNotification:(NSNotification *)notification {
175-
[[NSNotificationCenter defaultCenter] removeObserver:self];
176-
177-
NSMutableDictionary *pushNotificationExtras = [NSMutableDictionary new];
178-
NSDictionary *customExtras = self.pendingPushNotificationExtras;
179-
if (customExtras != nil) {
180-
pushNotificationExtras = [NSMutableDictionary dictionaryWithDictionary:customExtras];
181-
[self postNotificationWithName:kCleverTapPushNotificationClicked andBody:pushNotificationExtras];
182-
}
183-
}
184-
185168
@end

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "clevertap-react-native",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "CleverTap React Native SDK.",
55
"main": "src/index.js",
66
"types": "src/index.d.ts",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const EventEmitter = Platform.select({
1212
* @param {int} libVersion - The updated library version. If current version is 1.1.0 then pass as 10100
1313
*/
1414
const libName = 'React-Native';
15-
const libVersion = 30100;
15+
const libVersion = 30101;
1616
CleverTapReact.setLibrary(libName,libVersion);
1717

1818
function defaultCallback(method, err, res) {

0 commit comments

Comments
 (0)