- 공식문서 (앱 설정방법 및 사용가능한 pod 목록) : https://firebase.google.com/docs/ios/setup?authuser=1#objective-c
1. Firebase에 앱 등록

2. GoogleService-Info.plist 파일 추가

3. Firebase SDK 추가 (Podfile 수정)

pod 'Firebase/Analytics' # add the Firebase pod for Google Analytics # or pod ‘Firebase/AnalyticsWithoutAdIdSupport’ # for Analytics without IDFA collection capability # add pods for any other desired Firebase products # https://firebase.google.com/docs/ios/setup#available-pods
4. 초기화 코드 추가 (네이티브 코드 수정)
Swift
냐 Objective-C
냐 보고 선택해서 추가하면 됨.일반적으로 react-native에서 변환된 코드는 Objective-C 코드다.

import UIKit import Firebase // <----- 추가 @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configure() // <------ 추가 return true } }

// @import 구문은 반드시 @implementation 바로 위에 선언해야함. @import UIKit; // <----- 추가 @import Firebase; // <----- 추가 @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [FIRApp configure]; // <------ 추가 return YES; }
5. 설정 끝
