google-sercives.json을 앱수준 디렉토리에 배치한다.GoogleService-Info.plist를 프로젝트 루트에 넣는다.(파란색 앱이름)add files to[프로젝트명]> copy files to destination를 통해 GoogleService-Info.plist를 프로젝트에 포함시킨다.(앱 타겟 체크 해야함)/android/build.gradle에 buildscript {
dependencies {
// ... other dependencies
classpath 'com.google.gms:google-services:4.4.4'
// Add me --- /\
}
}
/android/app/build.gradle에
apply plugin: 'com.google.gms.google-services' // <- Add this line
/ios/{projectName}/AppDelegate.swift에import Firebase <- Add this line
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Add me --- \/
FirebaseApp.configure()
// Add me --- /\
// ...
}
/ios/Podfile에
use_frameworks! :linkage => :static // Add me
$RNFirebaseAsStaticFramework = true // Add me
npm install @react-native-firebase/app @react-native-firebase/analytics
analitics전용 스토어를 만들어고
공용 init 스토어에 연결했다.