Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Examples/UIExplorer/UIExplorer/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
withDebugEnabled:NO // YES to enable debugging upon app launch
moduleName:@"UIExplorerApp"
launchOptions:launchOptions];

Expand Down
1 change: 1 addition & 0 deletions Libraries/RCTTest/RCTTestRunner.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ - (void)runTest:(SEL)test module:(NSString *)moduleName initialProps:(NSDictiona
RCTTestModule *testModule = [[RCTTestModule alloc] initWithSnapshotController:_snapshotController view:nil];
testModule.testSelector = test;
RCTBridge *bridge = [[RCTBridge alloc] initWithBundlePath:_script
withDebugEnabled:NO
moduleProvider:^(){
return @[testModule];
}
Expand Down
1 change: 1 addition & 0 deletions React/Base/RCTBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ extern NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
* parameters or configuration.
*/
- (instancetype)initWithBundlePath:(NSString *)bundlepath
withDebugEnabled:(BOOL)debugEnabled
moduleProvider:(RCTBridgeModuleProviderBlock)block
launchOptions:(NSDictionary *)launchOptions NS_DESIGNATED_INITIALIZER;

Expand Down
6 changes: 6 additions & 0 deletions React/Base/RCTBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,19 @@ @implementation RCTBridge
static id<RCTJavaScriptExecutor> _latestJSExecutor;

- (instancetype)initWithBundlePath:(NSString *)bundlePath
withDebugEnabled:(BOOL)debugEnabled
moduleProvider:(RCTBridgeModuleProviderBlock)block
launchOptions:(NSDictionary *)launchOptions
{
if ((self = [super init])) {
_bundlePath = bundlePath;
_moduleProvider = block;
_launchOptions = launchOptions;
#if DEBUG
if (debugEnabled == YES) {
self.executorClass = NSClassFromString(@"RCTWebSocketExecutor");
}
#endif
[self setUp];
[self bindKeys];
}
Expand Down
1 change: 1 addition & 0 deletions React/Base/RCTRootView.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extern NSString *const RCTReloadViewsNotification;
* to all the instances.
*/
- (instancetype)initWithBundleURL:(NSURL *)bundleURL
withDebugEnabled:(BOOL)debugginEnable
moduleName:(NSString *)moduleName
launchOptions:(NSDictionary *)launchOptions;

Expand Down
2 changes: 2 additions & 0 deletions React/Base/RCTRootView.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
}

- (instancetype)initWithBundleURL:(NSURL *)bundleURL
withDebugEnabled:(BOOL)debugEnabled
moduleName:(NSString *)moduleName
launchOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithBundlePath:bundleURL.absoluteString
withDebugEnabled:debugEnabled
moduleProvider:nil
launchOptions:launchOptions];
return [self initWithBridge:bridge
Expand Down