소스 검색

Exposed bridge in ReactNativeNavigation

yogevbd 6 년 전
부모
커밋
e3d5dad93c
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      lib/ios/ReactNativeNavigation.h
  2. 5
    0
      lib/ios/ReactNativeNavigation.m

+ 3
- 1
lib/ios/ReactNativeNavigation.h 파일 보기

@@ -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 파일 보기

@@ -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 {