@react-native-firebase/analytics 14.1.0 → 14.2.3

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [14.2.3](https://github.com/invertase/react-native-firebase/compare/v14.2.2...v14.2.3) (2022-01-20)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **analytics, ios:** Convert NSNull values to nil in order to correctly remove user properties ([dbc79c3](https://github.com/invertase/react-native-firebase/commit/dbc79c31810bf9bea4c3a782432c9b5625ad3d5f)), closes [#4931](https://github.com/invertase/react-native-firebase/issues/4931)
11
+
12
+ ## [14.2.2](https://github.com/invertase/react-native-firebase/compare/v14.2.1...v14.2.2) (2022-01-06)
13
+
14
+ **Note:** Version bump only for package @react-native-firebase/analytics
15
+
16
+ ## [14.2.1](https://github.com/invertase/react-native-firebase/compare/v14.2.0...v14.2.1) (2021-12-31)
17
+
18
+ **Note:** Version bump only for package @react-native-firebase/analytics
19
+
20
+ # [14.2.0](https://github.com/invertase/react-native-firebase/compare/v14.1.0...v14.2.0) (2021-12-31)
21
+
22
+ ### Bug Fixes
23
+
24
+ - **analytics:** correct native types for extend_session parameter ([#5973](https://github.com/invertase/react-native-firebase/issues/5973)) ([23fdf61](https://github.com/invertase/react-native-firebase/commit/23fdf61a613c6cde6d5f3c807a7b13274fa3ab5a))
25
+
6
26
  # [14.1.0](https://github.com/invertase/react-native-firebase/compare/v14.0.1...v14.1.0) (2021-12-18)
7
27
 
8
28
  ### Features
@@ -175,6 +175,10 @@ public class ReactNativeFirebaseAnalyticsModule extends ReactNativeFirebaseModul
175
175
  ((Bundle) item).putInt(FirebaseAnalytics.Param.QUANTITY, (int) number);
176
176
  }
177
177
  }
178
+ if (bundle.containsKey(FirebaseAnalytics.Param.EXTEND_SESSION)) {
179
+ double number = bundle.getDouble(FirebaseAnalytics.Param.EXTEND_SESSION);
180
+ bundle.putLong(FirebaseAnalytics.Param.EXTEND_SESSION, (long) number);
181
+ }
178
182
  return bundle;
179
183
  }
180
184
  }
@@ -66,7 +66,7 @@ RCT_EXPORT_METHOD(setUserId
66
66
  : (RCTPromiseResolveBlock)resolve rejecter
67
67
  : (RCTPromiseRejectBlock)reject) {
68
68
  @try {
69
- [FIRAnalytics setUserID:id];
69
+ [FIRAnalytics setUserID:[self convertNSNullToNil:id]];
70
70
  } @catch (NSException *exception) {
71
71
  return [RNFBSharedUtils rejectPromiseWithExceptionDict:reject exception:exception];
72
72
  }
@@ -79,7 +79,7 @@ RCT_EXPORT_METHOD(setUserProperty
79
79
  : (RCTPromiseResolveBlock)resolve rejecter
80
80
  : (RCTPromiseRejectBlock)reject) {
81
81
  @try {
82
- [FIRAnalytics setUserPropertyString:value forName:name];
82
+ [FIRAnalytics setUserPropertyString:[self convertNSNullToNil:value] forName:name];
83
83
  } @catch (NSException *exception) {
84
84
  return [RNFBSharedUtils rejectPromiseWithExceptionDict:reject exception:exception];
85
85
  }
@@ -92,7 +92,7 @@ RCT_EXPORT_METHOD(setUserProperties
92
92
  : (RCTPromiseRejectBlock)reject) {
93
93
  @try {
94
94
  [properties enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) {
95
- [FIRAnalytics setUserPropertyString:value forName:key];
95
+ [FIRAnalytics setUserPropertyString:[self convertNSNullToNil:value] forName:key];
96
96
  }];
97
97
  } @catch (NSException *exception) {
98
98
  return [RNFBSharedUtils rejectPromiseWithExceptionDict:reject exception:exception];
@@ -155,7 +155,17 @@ RCT_EXPORT_METHOD(setDefaultEventParameters
155
155
  }];
156
156
  newParams[kFIRParameterItems] = [newItems copy];
157
157
  }
158
+ NSNumber *extendSession = [newParams valueForKey:kFIRParameterExtendSession];
159
+ if ([extendSession isEqualToNumber:@1]) {
160
+ newParams[kFIRParameterExtendSession] = @YES;
161
+ }
158
162
  return [newParams copy];
159
163
  }
160
164
 
165
+ /// Converts null values received over the bridge from NSNull to nil
166
+ /// @param value Nullable string value
167
+ - (NSString *)convertNSNullToNil:(NSString *)value {
168
+ return [value isEqual:[NSNull null]] ? nil : value;
169
+ }
170
+
161
171
  @end
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- module.exports = '14.1.0';
2
+ module.exports = '14.2.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/analytics",
3
- "version": "14.1.0",
3
+ "version": "14.2.3",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The analytics module provides out of the box support with Google Analytics for Firebase. Integration with the Android & iOS allows for in-depth analytical insight reporting, such as device information, location, user actions and more.",
6
6
  "main": "lib/index.js",
@@ -22,10 +22,10 @@
22
22
  "analytics"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@react-native-firebase/app": "14.1.0"
25
+ "@react-native-firebase/app": "14.2.3"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "8efda506474b1757f6a0537495a1de581d372299"
30
+ "gitHead": "eb58323969bc7803b0695bd90cdb7dc3436179e1"
31
31
  }