Skip to content
This repository was archived by the owner on Dec 29, 2020. It is now read-only.

Commit 2d9bdf6

Browse files
authored
[v6] Implement Cloud Storage (invertase#2043)
See the changelog for detailed changes.
1 parent ca9d1df commit 2d9bdf6

File tree

3 files changed

+49
-33
lines changed

3 files changed

+49
-33
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
jcenter()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:3.3.2'
7+
classpath 'com.android.tools.build:gradle:3.4.0'
88
}
99
}
1010

ios/RNFBAnalytics.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.platform = :ios, "10.0"
1717
s.source_files = 'RNFBAnalytics/**/*.{h,m}'
1818
s.dependency 'React'
19-
s.dependency 'Firebase/Core', '~> 5.19.0'
19+
s.dependency 'Firebase/Core', '~> 5.20.2'
2020
s.dependency 'RNFBApp'
2121
s.static_framework = true
2222
end

lib/index.d.ts

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,58 @@ import {
2222
} from '@react-native-firebase/app-types';
2323

2424
/**
25-
* Analytics integrates across Firebase features and provides
26-
* you with unlimited reporting for up to 500 distinct events
27-
* that you can define using the Firebase SDK. Analytics reports
28-
* help you understand clearly how your users behave, which enables
29-
* you to make informed decisions regarding app marketing and
30-
* performance optimizations.
25+
* Firebase Analytics package for React Native.
26+
*
27+
* #### Example 1
28+
*
29+
* Access the firebase export from the `analytics` package:
30+
*
31+
* ```js
32+
* import { firebase } from '@react-native-firebase/analytics';
33+
*
34+
* // firebase.analytics().X
35+
* ```
36+
*
37+
* #### Example 2
38+
*
39+
* Using the default export from the `analytics` package:
40+
*
41+
* ```js
42+
* import analytics from '@react-native-firebase/analytics';
43+
*
44+
* // analytics().X
45+
* ```
46+
*
47+
* #### Example 3
48+
*
49+
* Using the default export from the `app` package:
50+
*
51+
* ```js
52+
* import firebase from '@react-native-firebase/app';
53+
* import '@react-native-firebase/analytics';
54+
*
55+
* // firebase.analytics().X
56+
* ```
3157
*
3258
* @firebase analytics
3359
*/
3460
export namespace Analytics {
3561
export interface Statics {}
3662

37-
export interface Module extends ReactNativeFirebaseModule {
63+
/**
64+
* The Firebase Analytics service interface.
65+
*
66+
* > This module is available for the default app only.
67+
*
68+
* #### Example
69+
*
70+
* Get the Analytics service for the default app:
71+
*
72+
* ```js
73+
* const defaultAppAnalytics = firebase.analytics();
74+
* ```
75+
*/
76+
export class Module extends ReactNativeFirebaseModule {
3877
/**
3978
* Log a custom event with optional params.
4079
*
@@ -183,7 +222,6 @@ declare module '@react-native-firebase/analytics' {
183222
const FirebaseNamespaceExport: {} & ReactNativeFirebaseNamespace;
184223

185224
/**
186-
* @example
187225
* ```js
188226
* import { firebase } from '@react-native-firebase/analytics';
189227
* firebase.analytics().logEvent(...);
@@ -195,13 +233,7 @@ declare module '@react-native-firebase/analytics' {
195233
Analytics.Module,
196234
Analytics.Statics
197235
>;
198-
/**
199-
* @example
200-
* ```js
201-
* import analytics from '@react-native-firebase/analytics';
202-
* analytics().logEvent(...);
203-
* ```
204-
*/
236+
205237
export default AnalyticsDefaultExport;
206238
}
207239

@@ -210,29 +242,13 @@ declare module '@react-native-firebase/analytics' {
210242
*/
211243
declare module '@react-native-firebase/app-types' {
212244
interface ReactNativeFirebaseNamespace {
213-
/**
214-
* Analytics integrates across Firebase features and provides
215-
* you with unlimited reporting for up to 500 distinct events
216-
* that you can define using the Firebase SDK. Analytics reports
217-
* help you understand clearly how your users behave, which enables
218-
* you to make informed decisions regarding app marketing and
219-
* performance optimizations.
220-
*/
221245
analytics: ReactNativeFirebaseModuleAndStatics<
222246
Analytics.Module,
223247
Analytics.Statics
224248
>;
225249
}
226250

227251
interface FirebaseApp {
228-
/**
229-
* Analytics integrates across Firebase features and provides
230-
* you with unlimited reporting for up to 500 distinct events
231-
* that you can define using the Firebase SDK. Analytics reports
232-
* help you understand clearly how your users behave, which enables
233-
* you to make informed decisions regarding app marketing and
234-
* performance optimizations.
235-
*/
236252
analytics(): Analytics.Module;
237253
}
238254
}

0 commit comments

Comments
 (0)