Minor cleanup to make loader unaware of bridge
Summary: The loader should be a utility that stands alone. The bridge uses the loader, not the other way around. Reviewed By: bnham Differential Revision: D3546157 fbshipit-source-id: 91016afb629df1f8c83c8fca6f42649be0b046b0
This commit is contained in:
parent
c7a590655c
commit
3be8c957b0
|
@ -7,10 +7,10 @@
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* 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;
|
@class RCTBridge;
|
||||||
|
|
||||||
|
#import "RCTJavaScriptLoader.h"
|
||||||
|
|
||||||
@protocol RCTBridgeDelegate <NSObject>
|
@protocol RCTBridgeDelegate <NSObject>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
#import "RCTBridgeDelegate.h"
|
|
||||||
|
|
||||||
extern uint32_t const RCTRAMBundleMagicNumber;
|
extern uint32_t const RCTRAMBundleMagicNumber;
|
||||||
|
|
||||||
extern NSString *const RCTJavaScriptLoaderErrorDomain;
|
extern NSString *const RCTJavaScriptLoaderErrorDomain;
|
||||||
|
@ -25,13 +23,8 @@ NS_ENUM(NSInteger) {
|
||||||
RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously = 1000,
|
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
|
@interface RCTJavaScriptLoader : NSObject
|
||||||
|
|
||||||
+ (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(RCTSourceLoadBlock)onComplete;
|
+ (void)loadBundleAtURL:(NSURL *)scriptURL onComplete:(RCTSourceLoadBlock)onComplete;
|
||||||
|
|
Loading…
Reference in New Issue