构建后无法访问React Native开发人员菜单

时间:2019-01-15 16:22:55

标签: ios xcode react-native

我无法再通过CMD + D打开开发菜单,也无法通过CMD + R重新加载。部署到应用商店后,它停止工作

更多信息:

  • 摇动手势不起作用
  • 实时重新加载无效

我试图解决的问题:

  • 在Xcode中将Scheme切换为引用Debug
  • 尝试了其他模拟器
  • 按版本降级/升级
  • 运行react-native upgrade并对所有覆盖均表示是
  • 完全重新安装所有NPM模块
  • 重置模拟器
  • 干净的构建
  • 重新启动

编辑:

包括AppDelegate.m

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"PresentApp"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}

@end

0 个答案:

没有答案