Skip to content

Commit a90d911

Browse files
committed
Add firebase setup
1 parent 634ec22 commit a90d911

File tree

7 files changed

+119
-2
lines changed

7 files changed

+119
-2
lines changed

android/app/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: 'com.google.gms.google-services'
23

34
import com.android.build.OutputFile
45

@@ -185,6 +186,8 @@ dependencies {
185186
implementation fileTree(dir: "libs", include: ["*.jar"])
186187
implementation "com.facebook.react:react-native:+" // From node_modules
187188

189+
implementation 'com.google.firebase:firebase-analytics:17.2.2'
190+
188191
if (enableHermes) {
189192
def hermesPath = "../../node_modules/hermes-engine/android/";
190193
debugImplementation files(hermesPath + "hermes-debug.aar")

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ buildscript {
1313
}
1414
dependencies {
1515
classpath("com.android.tools.build:gradle:3.4.2")
16-
16+
classpath 'com.google.gms:google-services:4.3.3'
1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files
1919
}

ios/Podfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ target 'lost' do
3636

3737
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
3838

39+
pod 'Firebase/Analytics'
40+
3941
target 'lostTests' do
4042
inherit! :search_paths
4143
# Pods for testing

ios/Podfile.lock

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,43 @@ PODS:
99
- React-Core (= 0.61.5)
1010
- React-jsi (= 0.61.5)
1111
- ReactCommon/turbomodule/core (= 0.61.5)
12+
- Firebase/Analytics (6.16.0):
13+
- Firebase/Core
14+
- Firebase/Core (6.16.0):
15+
- Firebase/CoreOnly
16+
- FirebaseAnalytics (= 6.2.2)
17+
- Firebase/CoreOnly (6.16.0):
18+
- FirebaseCore (= 6.6.1)
19+
- FirebaseAnalytics (6.2.2):
20+
- FirebaseCore (~> 6.6)
21+
- FirebaseInstanceID (~> 4.3)
22+
- GoogleAppMeasurement (= 6.2.2)
23+
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
24+
- GoogleUtilities/MethodSwizzler (~> 6.0)
25+
- GoogleUtilities/Network (~> 6.0)
26+
- "GoogleUtilities/NSData+zlib (~> 6.0)"
27+
- nanopb (= 0.3.9011)
28+
- FirebaseCore (6.6.1):
29+
- FirebaseCoreDiagnostics (~> 1.2)
30+
- FirebaseCoreDiagnosticsInterop (~> 1.2)
31+
- GoogleUtilities/Environment (~> 6.5)
32+
- GoogleUtilities/Logger (~> 6.5)
33+
- FirebaseCoreDiagnostics (1.2.0):
34+
- FirebaseCoreDiagnosticsInterop (~> 1.2)
35+
- GoogleDataTransportCCTSupport (~> 1.3)
36+
- GoogleUtilities/Environment (~> 6.5)
37+
- GoogleUtilities/Logger (~> 6.5)
38+
- nanopb (~> 0.3.901)
39+
- FirebaseCoreDiagnosticsInterop (1.2.0)
40+
- FirebaseInstallations (1.1.0):
41+
- FirebaseCore (~> 6.6)
42+
- GoogleUtilities/UserDefaults (~> 6.5)
43+
- PromisesObjC (~> 1.2)
44+
- FirebaseInstanceID (4.3.0):
45+
- FirebaseCore (~> 6.6)
46+
- FirebaseInstallations (~> 1.0)
47+
- GoogleUtilities/Environment (~> 6.5)
48+
- GoogleUtilities/UserDefaults (~> 6.5)
1249
- Folly (2018.10.22.00):
1350
- boost-for-react-native
1451
- DoubleConversion
@@ -19,6 +56,40 @@ PODS:
1956
- DoubleConversion
2057
- glog
2158
- glog (0.3.5)
59+
- GoogleAppMeasurement (6.2.2):
60+
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
61+
- GoogleUtilities/MethodSwizzler (~> 6.0)
62+
- GoogleUtilities/Network (~> 6.0)
63+
- "GoogleUtilities/NSData+zlib (~> 6.0)"
64+
- nanopb (= 0.3.9011)
65+
- GoogleDataTransport (3.3.1)
66+
- GoogleDataTransportCCTSupport (1.3.1):
67+
- GoogleDataTransport (~> 3.3)
68+
- nanopb (~> 0.3.901)
69+
- GoogleUtilities/AppDelegateSwizzler (6.5.1):
70+
- GoogleUtilities/Environment
71+
- GoogleUtilities/Logger
72+
- GoogleUtilities/Network
73+
- GoogleUtilities/Environment (6.5.1)
74+
- GoogleUtilities/Logger (6.5.1):
75+
- GoogleUtilities/Environment
76+
- GoogleUtilities/MethodSwizzler (6.5.1):
77+
- GoogleUtilities/Logger
78+
- GoogleUtilities/Network (6.5.1):
79+
- GoogleUtilities/Logger
80+
- "GoogleUtilities/NSData+zlib"
81+
- GoogleUtilities/Reachability
82+
- "GoogleUtilities/NSData+zlib (6.5.1)"
83+
- GoogleUtilities/Reachability (6.5.1):
84+
- GoogleUtilities/Logger
85+
- GoogleUtilities/UserDefaults (6.5.1):
86+
- GoogleUtilities/Logger
87+
- nanopb (0.3.9011):
88+
- nanopb/decode (= 0.3.9011)
89+
- nanopb/encode (= 0.3.9011)
90+
- nanopb/decode (0.3.9011)
91+
- nanopb/encode (0.3.9011)
92+
- PromisesObjC (1.2.8)
2293
- RCTRequired (0.61.5)
2394
- RCTTypeSafety (0.61.5):
2495
- FBLazyVector (= 0.61.5)
@@ -239,6 +310,7 @@ DEPENDENCIES:
239310
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
240311
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
241312
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
313+
- Firebase/Analytics
242314
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
243315
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
244316
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
@@ -276,6 +348,19 @@ DEPENDENCIES:
276348
SPEC REPOS:
277349
trunk:
278350
- boost-for-react-native
351+
- Firebase
352+
- FirebaseAnalytics
353+
- FirebaseCore
354+
- FirebaseCoreDiagnostics
355+
- FirebaseCoreDiagnosticsInterop
356+
- FirebaseInstallations
357+
- FirebaseInstanceID
358+
- GoogleAppMeasurement
359+
- GoogleDataTransport
360+
- GoogleDataTransportCCTSupport
361+
- GoogleUtilities
362+
- nanopb
363+
- PromisesObjC
279364

280365
EXTERNAL SOURCES:
281366
DoubleConversion:
@@ -350,8 +435,21 @@ SPEC CHECKSUMS:
350435
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
351436
FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
352437
FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
438+
Firebase: 497158b816d0a86fc31babbd05546fcd7e6083ff
439+
FirebaseAnalytics: cf95d3aab897612783020fbd98401d5366f135ee
440+
FirebaseCore: 85064903ed6c28e47fec9c7bd149d94ba1b6b6e7
441+
FirebaseCoreDiagnostics: 5e78803ab276bc5b50340e3c539c06c3de35c649
442+
FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
443+
FirebaseInstallations: 575cd32f2aec0feeb0e44f5d0110a09e5e60b47b
444+
FirebaseInstanceID: 6668efc1655a4052c083f287a7141f1ead12f9c2
353445
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
354446
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
447+
GoogleAppMeasurement: d0560d915abf15e692e8538ba1d58442217b6aff
448+
GoogleDataTransport: 0048df6388dab1c254799f2a30365b1dffe20422
449+
GoogleDataTransportCCTSupport: f880d70972efa2ed1be4e9173a0f4c5f3dc2d176
450+
GoogleUtilities: 06eb53bb579efe7099152735900dd04bf09e7275
451+
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
452+
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
355453
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
356454
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
357455
React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
@@ -381,6 +479,6 @@ SPEC CHECKSUMS:
381479
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
382480
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
383481

384-
PODFILE CHECKSUM: a521b20a1b0902c6d7c17b5fc1ecadf4e36d26e6
482+
PODFILE CHECKSUM: 3b66506f86ae7486d8598d10121f4b20193bdd3a
385483

386484
COCOAPODS: 1.8.4

ios/lost.xcodeproj/project.pbxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
51F80220197E14FD7B54D841 /* libPods-lost-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C7ECD7A5478A1C3DE79FBCD /* libPods-lost-tvOSTests.a */; };
2121
6222EEF952E89D250E22E7B7 /* libPods-lostTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ABEB3E7B315430FE932C817 /* libPods-lostTests.a */; };
2222
88033553C59A8F4898AB7032 /* libPods-lost-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 57690CF85F2E8B244B342D44 /* libPods-lost-tvOS.a */; };
23+
AA1A74F1242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
24+
AA1A74F2242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
25+
AA1A74F3242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
26+
AA1A74F4242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
2327
/* End PBXBuildFile section */
2428

2529
/* Begin PBXContainerItemProxy section */
@@ -59,6 +63,7 @@
5963
80CF4AF78CF8E221DFCEB1E6 /* Pods-lost-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lost-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-lost-tvOSTests/Pods-lost-tvOSTests.debug.xcconfig"; sourceTree = "<group>"; };
6064
9ABEB3E7B315430FE932C817 /* libPods-lostTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-lostTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6165
A036699B034E20A65D33D9BA /* Pods-lost-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lost-tvOS.release.xcconfig"; path = "Target Support Files/Pods-lost-tvOS/Pods-lost-tvOS.release.xcconfig"; sourceTree = "<group>"; };
66+
AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
6267
ADC5F6C3B9286FA673716C6F /* Pods-lostTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lostTests.release.xcconfig"; path = "Target Support Files/Pods-lostTests/Pods-lostTests.release.xcconfig"; sourceTree = "<group>"; };
6368
ADD6F624A6E54D3D56499427 /* Pods-lost.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lost.release.xcconfig"; path = "Target Support Files/Pods-lost/Pods-lost.release.xcconfig"; sourceTree = "<group>"; };
6469
CC84885D332AE50C2D0C8EA8 /* Pods-lostTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lostTests.debug.xcconfig"; path = "Target Support Files/Pods-lostTests/Pods-lostTests.debug.xcconfig"; sourceTree = "<group>"; };
@@ -125,6 +130,7 @@
125130
13B07FAE1A68108700A75B9A /* lost */ = {
126131
isa = PBXGroup;
127132
children = (
133+
AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */,
128134
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
129135
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
130136
13B07FB01A68108700A75B9A /* AppDelegate.m */,
@@ -336,6 +342,7 @@
336342
isa = PBXResourcesBuildPhase;
337343
buildActionMask = 2147483647;
338344
files = (
345+
AA1A74F2242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
339346
);
340347
runOnlyForDeploymentPostprocessing = 0;
341348
};
@@ -345,6 +352,7 @@
345352
files = (
346353
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
347354
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
355+
AA1A74F1242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
348356
);
349357
runOnlyForDeploymentPostprocessing = 0;
350358
};
@@ -353,13 +361,15 @@
353361
buildActionMask = 2147483647;
354362
files = (
355363
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
364+
AA1A74F3242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
356365
);
357366
runOnlyForDeploymentPostprocessing = 0;
358367
};
359368
2D02E48E1E0B4A5D006451C7 /* Resources */ = {
360369
isa = PBXResourcesBuildPhase;
361370
buildActionMask = 2147483647;
362371
files = (
372+
AA1A74F4242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
363373
);
364374
runOnlyForDeploymentPostprocessing = 0;
365375
};

ios/lost/AppDelegate.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#import <React/RCTBundleURLProvider.h>
1212
#import <React/RCTRootView.h>
1313

14+
@import Firebase;
15+
1416
@implementation AppDelegate
1517

1618
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@@ -27,6 +29,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2729
rootViewController.view = rootView;
2830
self.window.rootViewController = rootViewController;
2931
[self.window makeKeyAndVisible];
32+
[FIRApp configure];
3033
return YES;
3134
}
3235

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@react-navigation/native": "^5.0.9",
1818
"@react-navigation/stack": "^5.2.1",
1919
"@ui-kitten/components": "^4.4.1",
20+
"firebase": "^7.12.0",
2021
"react": "16.9.0",
2122
"react-native": "0.61.5",
2223
"react-native-appearance": "^0.3.3",

0 commit comments

Comments
 (0)