Ios 使用Firebase更新AppDelegate

Ios 使用Firebase更新AppDelegate,ios,react-native,Ios,React Native,我需要将以下代码添加到我的主AppDelegate,我有两个文件名为AppDelegate,AppDelegate.m,AppDelegate.h,我需要编辑哪一个 两个文件都没有@import它们都有#import @import UIKit; @import Firebase; @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOpt

我需要将以下代码添加到我的主
AppDelegate
,我有两个文件名为
AppDelegate
AppDelegate.m
AppDelegate.h
,我需要编辑哪一个

两个文件都没有@import它们都有#import

@import UIKit;
@import Firebase;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [FIRApp configure];
  return YES;
}

@import
iOS
7开始提供,是对#import的改进(有关更多信息,请参见示例)。您应该能够使用
@import Firebase
,否则它将是
#import

,您可以添加
[FIRApp configure]
AppDelegate.m
文件中。