Skip to content

It is not possible anymore to hot reload or debug on a real device #9688

@maluramichael

Description

@maluramichael

Issue Description

I want to debug an app on my iPhone but when i press the 'Debug JS Remotely' it crashes with the error '' and the button 'Hot Reload' is not even visible.

It seems like the packager is building always a pre built bundle of the app. There is no 'loading from xy' message at the top anymore and the build phase 'Bundle React Native code and images' inside Xcode takes really long.

Code Snippets

AppDelegate.m

/**
 * Copyright (c) 2015-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>

#import "AppDelegate.h"

#import "RCTBundleURLProvider.h"
#import "RCTRootView.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [Fabric with:@[[Crashlytics class]]];

    NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                        moduleName:@"Watchlist"
                                                 initialProperties:nil
                                                     launchOptions:launchOptions];

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

@end

Expected Results

Debug with Google Chrome and use the hot reload feature.

Additional Information

  • React Native version: 0.31.0 and 0.32.0
  • Platform: iOS
  • Operating System: osx 10.11.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions