Appdelegate.m抛出错误

时间:2019-06-07 19:26:27

标签: ios xcode react-native

我试图在xcode上运行我的react-native项目构建,但不幸的是,它开始对Appdelegate.m文件引发错误。

抛出的三个错误是:

  1. 方法'application:didFinishLaunchingWithOptions:'的重复声明

  2. 期望的表达式

  3. 使用未声明的标识符'center'

我尝试删除appdelegate.m文件,以查看构建是否可以刷新,但不幸的是,它仍然引发错误。下面显示的是问题代码:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  // Define UNUserNotificationCenter
  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
  center.delegate = self;

  return YES;
}

任何建议将不胜感激。该项目整个上午都在工作,而且似乎最近才退出AWOL。

0 个答案:

没有答案