Browse Source

Exposed bridge in ReactNativeNavigation

yogevbd 6 years ago
parent
commit
e3d5dad93c
2 changed files with 8 additions and 1 deletions
  1. 3
    1
      lib/ios/ReactNativeNavigation.h
  2. 5
    0
      lib/ios/ReactNativeNavigation.m

+ 3
- 1
lib/ios/ReactNativeNavigation.h View File

@@ -6,8 +6,10 @@ typedef UIViewController * (^RNNExternalViewCreator)(NSDictionary* props, RCTBri
6 6
 
7 7
 @interface ReactNativeNavigation : NSObject
8 8
 
9
-+(void)bootstrap:(NSURL*)jsCodeLocation launchOptions:(NSDictionary *)launchOptions;
9
++ (void)bootstrap:(NSURL *)jsCodeLocation launchOptions:(NSDictionary *)launchOptions;
10 10
 
11 11
 + (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback;
12 12
 
13
++ (RCTBridge *)getBridge;
14
+
13 15
 @end

+ 5
- 0
lib/ios/ReactNativeNavigation.m View File

@@ -23,6 +23,11 @@
23 23
 	[[ReactNativeNavigation sharedInstance].bridgeManager registerExternalComponent:name callback:callback];
24 24
 }
25 25
 
26
++ (RCTBridge *)getBridge {
27
+	return [[ReactNativeNavigation sharedInstance].bridgeManager bridge];
28
+}
29
+
30
+
26 31
 # pragma mark - instance
27 32
 
28 33
 + (instancetype) sharedInstance {