android google-service.json linking

This commit is contained in:
Loewy 2024-01-27 15:11:42 -08:00
parent abb718603e
commit 07118a870f
7 changed files with 118 additions and 4 deletions

21
App.tsx
View File

@ -1,9 +1,26 @@
import React from "react"; import React, { useEffect, useState } from "react";
import { Text } from "react-native"; import { Alert, Text } from "react-native";
import ClientProvider from "./graphql/client"; import ClientProvider from "./graphql/client";
import ShotsContainer from "./component/shot"; import ShotsContainer from "./component/shot";
import auth, { FirebaseAuthTypes } from '@react-native-firebase/auth';
const App: React.FC = () => { const App: React.FC = () => {
const testFirebaseAuth = async () => {
try {
// Attempt to sign in anonymously
const userCredential: FirebaseAuthTypes.UserCredential = await auth().signInAnonymously();
console.log('Signed in anonymously, User:', userCredential.user);
} catch (error) {
console.error('Error with Firebase Auth:', error);
}
};
useEffect(() => {
testFirebaseAuth();
}, []);
return ( return (
<ClientProvider> <ClientProvider>
<ShotsContainer /> <ShotsContainer />

View File

@ -178,3 +178,5 @@ dependencies {
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesAppBuildGradle(project) applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services'

View File

@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "735905563616",
"project_id": "railbird-infra",
"storage_bucket": "railbird-infra.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:735905563616:android:7eefd99f68d2f7db702185",
"android_client_info": {
"package_name": "android.railbird.app"
}
},
"oauth_client": [
{
"client_id": "735905563616-v12rcdm7pkm1r2t5v09th5bs9j3ah1e4.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA5o4LpiDFl8Q8AaA2eGjbgdS7tMfupCWg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "735905563616-v12rcdm7pkm1r2t5v09th5bs9j3ah1e4.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "735905563616-ncd8794ocn2f25qmnaascn88upfgokp0.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "ai.railbird.railbird",
"app_store_id": "6469274937"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@ -25,7 +25,6 @@
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="com.anonymous.DummyApp"/>
<data android:scheme="android.railbird.app"/> <data android:scheme="android.railbird.app"/>
</intent-filter> </intent-filter>
</activity> </activity>

View File

@ -17,6 +17,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.google.gms:google-services:4.3.3'
classpath('com.android.tools.build:gradle:7.4.2') classpath('com.android.tools.build:gradle:7.4.2')
classpath('com.facebook.react:react-native-gradle-plugin') classpath('com.facebook.react:react-native-gradle-plugin')
} }

View File

@ -36,7 +36,8 @@
"foregroundImage": "./assets/adaptive-icon.png", "foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff" "backgroundColor": "#ffffff"
}, },
"package": "android.railbird.app" "package": "android.railbird.app",
"googleServicesFile": "./google-services.json"
}, },
"web": { "web": {
"favicon": "./assets/favicon.png" "favicon": "./assets/favicon.png"

47
google-services.json Normal file
View File

@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "735905563616",
"project_id": "railbird-infra",
"storage_bucket": "railbird-infra.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:735905563616:android:7eefd99f68d2f7db702185",
"android_client_info": {
"package_name": "android.railbird.app"
}
},
"oauth_client": [
{
"client_id": "735905563616-v12rcdm7pkm1r2t5v09th5bs9j3ah1e4.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA5o4LpiDFl8Q8AaA2eGjbgdS7tMfupCWg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "735905563616-v12rcdm7pkm1r2t5v09th5bs9j3ah1e4.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "735905563616-ncd8794ocn2f25qmnaascn88upfgokp0.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "ai.railbird.railbird",
"app_store_id": "6469274937"
}
}
]
}
}
}
],
"configuration_version": "1"
}