[ReactNative] Add RCTBridgeDelegate

Summary:
Add a new bridge delegate protocol to allow a more flexible bridge configuration.

For now it just support the pre-existent configurations + providing the JavaScript
source to the bridge, that should allow pre-loading sources.
This commit is contained in:
Tadeu Zagallo
2015-07-28 15:48:46 -07:00
parent 068f396c9b
commit 127f7095dc
9 changed files with 167 additions and 72 deletions

View File

@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
#import "RCTJavaScriptExecutor.h"
#import "RCTBridgeDelegate.h"
@class RCTBridge;
@@ -20,8 +20,6 @@
*/
@interface RCTJavaScriptLoader : NSObject
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
- (void)loadBundleAtURL:(NSURL *)moduleURL onComplete:(void (^)(NSError *, NSString *))onComplete;
+ (void)loadBundleAtURL:(NSURL *)moduleURL onComplete:(RCTSourceLoadBlock)onComplete;
@end