Update google files, add visual confirmation on firebase initialization

This commit is contained in:
ugiacoman 2017-07-05 09:15:48 -04:00
parent 2c11e13e90
commit f3858037fc
5 changed files with 76 additions and 15 deletions

View File

@ -1,11 +1,16 @@
### Android
### Description
1) Add your `google-services.json` inside of `android/app`
- make sure the `package_name` inside of your file points to `com.demo`
This example project implements `react-native-firebase` as described in the
[installation instructions](http://invertase.io/react-native-firebase/#/initial-setup).
### iOS
### Usage
1) Add GoogleService-Info.plist
- make sure the `BUNDLE_ID` inside of your file points to `com.demo`
2) Run pod install
3) Open up `demo.xcworkspace`
1) Install `node_modules`: `$ yarn`
#### iOS
1) Go into ios root directory where the `Podfile` is located
2) Install pods: `$ pod install`
3) Run app: `$ react-native run-ios`
#### Android
1) Run app: `$ react-native run-android`

View File

@ -135,6 +135,7 @@ android {
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.google.android.gms:play-services-base:11.0.0"
compile "com.facebook.react:react-native:+" // From node_modules
compile(project(':react-native-firebase')) {

View File

@ -1,13 +1,28 @@
import React from 'react'
import { View } from 'react-native'
import { View, Text, StyleSheet } from 'react-native'
import firebase from './lib/firebase'
export default class App extends React.Component {
render () {
return (
<View
style={{flex: 1, backgroundColor: 'red'}}
/>
style={styles.container}
>
<Text>
Successfully imported and running react-native-firebase.
</Text>
<Text>
Running app: {firebase.apps}
</Text>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
}
})

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
<string>ca-app-pub-3940256099942544/2934735716</string>
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
<string>305229645282-22imndi01abc2p6esgtu1i1m9mqrd0ib.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.305229645282-22imndi01abc2p6esgtu1i1m9mqrd0ib</string>
<key>API_KEY</key>
<string>AIzaSyAcdVLG5dRzA1ck_fa_xd4Z0cY7cga7S5A</string>
<key>GCM_SENDER_ID</key>
<string>305229645282</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.demo</string>
<key>PROJECT_ID</key>
<string>rnfirebase-b9ad4</string>
<key>STORAGE_BUCKET</key>
<string>rnfirebase-b9ad4.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<true/>
<key>IS_ANALYTICS_ENABLED</key>
<false/>
<key>IS_APPINVITE_ENABLED</key>
<false/>
<key>IS_GCM_ENABLED</key>
<true/>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>GOOGLE_APP_ID</key>
<string>1:305229645282:ios:7b45748cb1117d2d</string>
<key>DATABASE_URL</key>
<string>https://rnfirebase-b9ad4.firebaseio.com</string>
</dict>
</plist>

View File

@ -37,7 +37,7 @@
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
2DCD954D1E0B4F2C00145EB5 /* demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* demoTests.m */; };
49AD62206CA8125FA248442D /* libPods-demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D93F5A58817D14210226E62 /* libPods-demo.a */; };
4BDB01FB1F0C62DC00A6D842 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4BDB01FA1F0C62DC00A6D842 /* GoogleService-Info.plist */; };
4BDB021C1F0D1A8D00A6D842 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4BDB021B1F0D1A8D00A6D842 /* GoogleService-Info.plist */; };
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
B3E16CE8D9F2A527C5ABD05B /* libPods-demoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B45536C36F1FEF9D53052C8D /* libPods-demoTests.a */; };
@ -276,7 +276,7 @@
38D59AE4857D495E0D1B8579 /* Pods-demoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demoTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-demoTests/Pods-demoTests.release.xcconfig"; sourceTree = "<group>"; };
43A2ECAC58D0BA9375086208 /* Pods-demoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demoTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-demoTests/Pods-demoTests.debug.xcconfig"; sourceTree = "<group>"; };
486E30F10089C88A7332A528 /* libPods-demo-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-demo-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4BDB01FA1F0C62DC00A6D842 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "demo/GoogleService-Info.plist"; sourceTree = "<group>"; };
4BDB021B1F0D1A8D00A6D842 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
4DCEEBCB96250D77968E696E /* Pods-demo-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-demo-tvOS/Pods-demo-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
5D0D3588A545278D0BE6BF2B /* Pods-demo-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-tvOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-demo-tvOSTests/Pods-demo-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
@ -443,7 +443,7 @@
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */,
4BDB01FA1F0C62DC00A6D842 /* GoogleService-Info.plist */,
4BDB021B1F0D1A8D00A6D842 /* GoogleService-Info.plist */,
);
name = demo;
sourceTree = "<group>";
@ -934,7 +934,7 @@
files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
4BDB01FB1F0C62DC00A6D842 /* GoogleService-Info.plist in Resources */,
4BDB021C1F0D1A8D00A6D842 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};