Skip to content

Commit

Permalink
Release 3.1.1 (#443)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
kushCT and Anush-Shand authored Nov 6, 2024
1 parent d0ed9bf commit 2c2ab96
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 25 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

Version 3.1.1 *(6 November 2024)*
-------------------------------------------
**Bug Fixes**

* **[iOS Platform]**
* Fixes a bug where the push notification callback was getting triggered twice in killed state.

Version 3.1.0 *(25 October 2024)*
-------------------------------------------
**What's new**
Expand Down
2 changes: 1 addition & 1 deletion Example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 34
versionCode 310
versionName "3.1.0"
versionCode 311
versionName "3.1.1"
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
}

Expand Down
1 change: 0 additions & 1 deletion ios/CleverTapReact/CleverTapReactManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
- (void)setDelegates:(CleverTap *)cleverTapInstance;

@property NSString *launchDeepLink;
@property(nonatomic, strong) NSDictionary *pendingPushNotificationExtras;

@end
17 changes: 0 additions & 17 deletions ios/CleverTapReact/CleverTapReactManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ + (instancetype)sharedInstance {
- (instancetype)init {
self = [super init];
if (self) {

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleContentDidAppearNotification:)
name:RCTContentDidAppearNotification
object:nil];
CleverTap *clevertap = [CleverTap sharedInstance];
[self setDelegates:clevertap];
}
Expand All @@ -63,7 +58,6 @@ - (void)setDelegates:(CleverTap *)cleverTapInstance {
- (void)applicationDidLaunchWithOptions:(NSDictionary *)options {
NSDictionary *notification = [options valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (notification){
self.pendingPushNotificationExtras = notification;
if (notification[@"wzrk_dl"]) {
self.launchDeepLink = notification[@"wzrk_dl"];
RCTLogInfo(@"CleverTapReact: setting launch deeplink: %@", self.launchDeepLink);
Expand Down Expand Up @@ -171,15 +165,4 @@ - (void)onPushPermissionResponse:(BOOL)accepted {
[self postNotificationWithName:kCleverTapPushPermissionResponseReceived andBody:body];
}

- (void)handleContentDidAppearNotification:(NSNotification *)notification {
[[NSNotificationCenter defaultCenter] removeObserver:self];

NSMutableDictionary *pushNotificationExtras = [NSMutableDictionary new];
NSDictionary *customExtras = self.pendingPushNotificationExtras;
if (customExtras != nil) {
pushNotificationExtras = [NSMutableDictionary dictionaryWithDictionary:customExtras];
[self postNotificationWithName:kCleverTapPushNotificationClicked andBody:pushNotificationExtras];
}
}

@end
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clevertap-react-native",
"version": "3.1.0",
"version": "3.1.1",
"description": "CleverTap React Native SDK.",
"main": "src/index.js",
"types": "src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const EventEmitter = Platform.select({
* @param {int} libVersion - The updated library version. If current version is 1.1.0 then pass as 10100
*/
const libName = 'React-Native';
const libVersion = 30100;
const libVersion = 30101;
CleverTapReact.setLibrary(libName,libVersion);

function defaultCallback(method, err, res) {
Expand Down

0 comments on commit 2c2ab96

Please sign in to comment.