@react-native-firebase/analytics 18.4.0 → 18.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/android/build.gradle +7 -1
- package/ios/RNFBAnalytics/RNFBAnalyticsModule.m +13 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +16 -0
- package/lib/modular/index.d.ts +13 -0
- package/lib/modular/index.js +12 -0
- package/lib/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
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
|
+
## [18.6.0](https://github.com/invertase/react-native-firebase/compare/v18.5.0...v18.6.0) (2023-10-26)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **android:** required compatibility for Gradle 8 in android modules ([b52d0ce](https://github.com/invertase/react-native-firebase/commit/b52d0ce6723c077190618641ce0f33ced9fd4090))
|
11
|
+
|
12
|
+
## [18.5.0](https://github.com/invertase/react-native-firebase/compare/v18.4.0...v18.5.0) (2023-09-22)
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
- **ios:** add initiateOnDeviceConversionMeasurementWithPhoneNumber ([80ac07e](https://github.com/invertase/react-native-firebase/commit/80ac07e207bad7f31a4805edb26e350f892fc5bf))
|
17
|
+
|
6
18
|
## [18.4.0](https://github.com/invertase/react-native-firebase/compare/v18.3.2...v18.4.0) (2023-09-11)
|
7
19
|
|
8
20
|
### Features
|
package/android/build.gradle
CHANGED
@@ -12,7 +12,7 @@ buildscript {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
dependencies {
|
15
|
-
classpath("com.android.tools.build:gradle:8.1.
|
15
|
+
classpath("com.android.tools.build:gradle:8.1.2")
|
16
16
|
}
|
17
17
|
}
|
18
18
|
}
|
@@ -121,6 +121,12 @@ android {
|
|
121
121
|
firebaseJsonAutomaticScreenReportingEnabled: automaticScreenReportingEnabled
|
122
122
|
]
|
123
123
|
}
|
124
|
+
|
125
|
+
buildFeatures {
|
126
|
+
// AGP 8 no longer builds config by default
|
127
|
+
buildConfig true
|
128
|
+
}
|
129
|
+
|
124
130
|
lintOptions {
|
125
131
|
disable 'GradleCompatible'
|
126
132
|
abortOnError false
|
@@ -164,6 +164,19 @@ RCT_EXPORT_METHOD(initiateOnDeviceConversionMeasurementWithEmailAddress
|
|
164
164
|
return resolve([NSNull null]);
|
165
165
|
}
|
166
166
|
|
167
|
+
RCT_EXPORT_METHOD(initiateOnDeviceConversionMeasurementWithPhoneNumber
|
168
|
+
: (NSString *)phoneNumber resolver
|
169
|
+
: (RCTPromiseResolveBlock)resolve rejecter
|
170
|
+
: (RCTPromiseRejectBlock)reject) {
|
171
|
+
@try {
|
172
|
+
[FIRAnalytics initiateOnDeviceConversionMeasurementWithPhoneNumber:phoneNumber];
|
173
|
+
} @catch (NSException *exception) {
|
174
|
+
return [RNFBSharedUtils rejectPromiseWithExceptionDict:reject exception:exception];
|
175
|
+
}
|
176
|
+
|
177
|
+
return resolve([NSNull null]);
|
178
|
+
}
|
179
|
+
|
167
180
|
#pragma mark -
|
168
181
|
#pragma mark Private methods
|
169
182
|
|
package/lib/index.d.ts
CHANGED
@@ -1718,6 +1718,15 @@ export namespace FirebaseAnalyticsTypes {
|
|
1718
1718
|
* @param emailAddress email address, properly formatted complete with domain name e.g, 'user@example.com'
|
1719
1719
|
*/
|
1720
1720
|
initiateOnDeviceConversionMeasurementWithEmailAddress(emailAddress: string): Promise<void>;
|
1721
|
+
|
1722
|
+
/**
|
1723
|
+
* start privacy-sensitive on-device conversion management.
|
1724
|
+
* This is iOS-only.
|
1725
|
+
* This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile
|
1726
|
+
*
|
1727
|
+
* @param phoneNumber phone number in E.164 format - that is a leading + sign, then up to 15 digits, no dashes or spaces.
|
1728
|
+
*/
|
1729
|
+
initiateOnDeviceConversionMeasurementWithPhoneNumber(phoneNumber: string): Promise<void>;
|
1721
1730
|
}
|
1722
1731
|
|
1723
1732
|
/**
|
package/lib/index.js
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
|
18
18
|
import {
|
19
19
|
isAlphaNumericUnderscore,
|
20
|
+
isE164PhoneNumber,
|
20
21
|
isIOS,
|
21
22
|
isNull,
|
22
23
|
isNumber,
|
@@ -85,6 +86,7 @@ export {
|
|
85
86
|
logViewSearchResults,
|
86
87
|
setDefaultEventParameters,
|
87
88
|
initiateOnDeviceConversionMeasurementWithEmailAddress,
|
89
|
+
initiateOnDeviceConversionMeasurementWithPhoneNumber,
|
88
90
|
} from './modular/index';
|
89
91
|
|
90
92
|
const ReservedEventNames = [
|
@@ -769,6 +771,20 @@ class FirebaseAnalyticsModule extends FirebaseModule {
|
|
769
771
|
|
770
772
|
return this.native.initiateOnDeviceConversionMeasurementWithEmailAddress(emailAddress);
|
771
773
|
}
|
774
|
+
|
775
|
+
initiateOnDeviceConversionMeasurementWithPhoneNumber(phoneNumber) {
|
776
|
+
if (!isE164PhoneNumber(phoneNumber)) {
|
777
|
+
throw new Error(
|
778
|
+
"firebase.analytics().initiateOnDeviceConversionMeasurementWithPhoneNumber(*) 'phoneNumber' expected a string value in E.164 format.",
|
779
|
+
);
|
780
|
+
}
|
781
|
+
|
782
|
+
if (!isIOS) {
|
783
|
+
return;
|
784
|
+
}
|
785
|
+
|
786
|
+
return this.native.initiateOnDeviceConversionMeasurementWithPhoneNumber(phoneNumber);
|
787
|
+
}
|
772
788
|
}
|
773
789
|
|
774
790
|
// import { SDK_VERSION } from '@react-native-firebase/analytics';
|
package/lib/modular/index.d.ts
CHANGED
@@ -1164,6 +1164,19 @@ export function initiateOnDeviceConversionMeasurementWithEmailAddress(
|
|
1164
1164
|
emailAddress: string,
|
1165
1165
|
): Promise<void>;
|
1166
1166
|
|
1167
|
+
/**
|
1168
|
+
* start privacy-sensitive on-device conversion management.
|
1169
|
+
* This is iOS-only.
|
1170
|
+
* This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile
|
1171
|
+
*
|
1172
|
+
* @param analytics Analytics instance.
|
1173
|
+
* @param phoneNumber phone number in E.164 format - that is a leading + sign, then up to 15 digits, no dashes or spaces.
|
1174
|
+
*/
|
1175
|
+
export function initiateOnDeviceConversionMeasurementWithPhoneNumber(
|
1176
|
+
analytics: Analytics,
|
1177
|
+
phoneNumber: string,
|
1178
|
+
): Promise<void>;
|
1179
|
+
|
1167
1180
|
/**
|
1168
1181
|
* Checks four different things.
|
1169
1182
|
* 1. Checks if it's not a browser extension environment.
|
package/lib/modular/index.js
CHANGED
@@ -622,6 +622,18 @@ export function initiateOnDeviceConversionMeasurementWithEmailAddress(analytics,
|
|
622
622
|
return analytics.initiateOnDeviceConversionMeasurementWithEmailAddress(emailAddress);
|
623
623
|
}
|
624
624
|
|
625
|
+
/**
|
626
|
+
* start privacy-sensitive on-device conversion management.
|
627
|
+
* This is iOS-only.
|
628
|
+
* This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile
|
629
|
+
*
|
630
|
+
* @param analytics Analytics instance.
|
631
|
+
* @param phoneNumber phone number in E.164 format - that is a leading + sign, then up to 15 digits, no dashes or spaces.
|
632
|
+
*/
|
633
|
+
export function initiateOnDeviceConversionMeasurementWithPhoneNumber(analytics, phoneNumber) {
|
634
|
+
return analytics.initiateOnDeviceConversionMeasurementWithPhoneNumber(phoneNumber);
|
635
|
+
}
|
636
|
+
|
625
637
|
/**
|
626
638
|
* Checks four different things.
|
627
639
|
* 1. Checks if it's not a browser extension environment.
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '18.
|
2
|
+
module.exports = '18.6.0';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/analytics",
|
3
|
-
"version": "18.
|
3
|
+
"version": "18.6.0",
|
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": "18.
|
25
|
+
"@react-native-firebase/app": "18.6.0"
|
26
26
|
},
|
27
27
|
"publishConfig": {
|
28
28
|
"access": "public"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "adbbd4171adb1e3c2306da1285520abbaf9313b8"
|
31
31
|
}
|