diff --git a/React/Base/RCTBridgeDelegate.h b/React/Base/RCTBridgeDelegate.h index 7639339858ca55..4d61057271fe05 100644 --- a/React/Base/RCTBridgeDelegate.h +++ b/React/Base/RCTBridgeDelegate.h @@ -19,6 +19,8 @@ * this should be an absolute URL, e.g. `http://localhost:8081/index.ios.bundle`. * When running from a locally bundled JS file, this should be a `file://` url * pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`. + * If you return nil you need to implement loadSourceForBridge:onProgress:onComplete: + * or loadSourceForBridge:withBlock: instead */ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge; diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 75be11f54b6fe9..10d756188afe23 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -668,7 +668,6 @@ - (void)executeApplicationScript:(NSData *)script onComplete:(RCTJavaScriptCompleteBlock)onComplete { RCTAssertParam(script); - RCTAssertParam(sourceURL); NSError *loadError; TaggedScript taggedScript = loadTaggedScript(script, sourceURL, @@ -717,6 +716,7 @@ static TaggedScript loadTaggedScript(NSData *script, NSData *loadedScript = NULL; switch (tag) { case facebook::react::ScriptTag::RAMBundle: + RCTAssertParam(sourceURL); [performanceLogger markStartForTag:RCTPLRAMBundleLoad]; loadedScript = loadRAMBundle(sourceURL, error, randomAccessBundle);