diff --git a/React/Base/RCTBridgeDelegate.h b/React/Base/RCTBridgeDelegate.h index baa3f5db1..02da39bda 100644 --- a/React/Base/RCTBridgeDelegate.h +++ b/React/Base/RCTBridgeDelegate.h @@ -7,10 +7,10 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourceLength); - @class RCTBridge; +#import "RCTJavaScriptLoader.h" + @protocol RCTBridgeDelegate /** diff --git a/React/Base/RCTJavaScriptLoader.h b/React/Base/RCTJavaScriptLoader.h index bf51d31ae..f98a7bdd2 100755 --- a/React/Base/RCTJavaScriptLoader.h +++ b/React/Base/RCTJavaScriptLoader.h @@ -9,8 +9,6 @@ #import -#import "RCTBridgeDelegate.h" - extern uint32_t const RCTRAMBundleMagicNumber; extern NSString *const RCTJavaScriptLoaderErrorDomain; @@ -25,13 +23,8 @@ NS_ENUM(NSInteger) { RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously = 1000, }; -@class RCTBridge; +typedef void (^RCTSourceLoadBlock)(NSError *error, NSData *source, int64_t sourceLength); -/** - * Class that allows easy embedding, loading, life-cycle management of a - * JavaScript application inside of a native application. - * TODO: Incremental module loading. (low pri). - */ @interface RCTJavaScriptLoader : NSObject + (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(RCTSourceLoadBlock)onComplete;