diff --git a/React/Base/RCTBatchedBridge.m b/React/Base/RCTBatchedBridge.m index 138e11695..98fdb5115 100644 --- a/React/Base/RCTBatchedBridge.m +++ b/React/Base/RCTBatchedBridge.m @@ -235,18 +235,13 @@ RCT_NOT_IMPLEMENTED(-initWithBundleURL:(__unused NSURL *)bundleURL NSString *configJSON = RCTJSONStringify(@{ @"remoteModuleConfig": config, }, NULL); - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [_javaScriptExecutor injectJSONText:configJSON - asGlobalObjectNamed:@"__fbBatchedBridgeConfig" callback: - ^(NSError *error) { - if (error) { - [[RCTRedBox sharedInstance] showError:error]; - } - - dispatch_semaphore_signal(semaphore); - }]; - - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW); + asGlobalObjectNamed:@"__fbBatchedBridgeConfig" + callback:^(NSError *error) { + if (error) { + [[RCTRedBox sharedInstance] showError:error]; + } + }]; NSURL *bundleURL = _parentBridge.bundleURL; if (_javaScriptExecutor == nil) {