代码之家  ›  专栏  ›  技术社区  ›  Olivier MATROT

开发人员菜单未在iOS设备上显示

  •  0
  • Olivier MATROT  · 技术社区  · 7 年前

    :我知道这类问题已经被多次提出,但在我的情况下似乎有点不同。

    免责声明2 :我无法使用模拟器,因为应用程序正在处理蓝牙设备。

    Debugging is enabled

    我摇了摇手机,什么都没发生,没有显影剂菜单。 我只想启用热重新加载,但我不能。

    谢谢你的帮助。

    编辑1 :来自AppDelegate.m的代码

    @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:@"RXApp"
                                                   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
    

    编辑2

    编辑3 using Cocoa Pods .

    1 回复  |  直到 7 年前
        1
  •  7
  •   Brijesh Shiroya    7 年前
    • 在当前架构中选择调试模式。

    注意:您的设备和pc应该在同一个网络中

        2
  •  0
  •   Olivier MATROT    7 年前

    我通过去掉CocoaPods/react native link并手动集成所有本机模块解决了这个问题。现在菜单又回来了,我所有的其他问题都消失了。

    推荐文章