Parcourir la source

ios fixed invalid bridge

Daniel Zlotin il y a 7 ans
Parent
révision
8b8d914a06

+ 20
- 19
ios/RNN.m Voir le fichier

@@ -9,14 +9,11 @@
9 9
 
10 10
 @interface RNN() <RCTBridgeDelegate>
11 11
 
12
-
13
-
14 12
 @end
15 13
 
16 14
 @implementation RNN {
17 15
 	NSURL *_jsCodeLocation;
18 16
 	RCTBridge *_bridge;
19
-	RNNEventEmitter *_eventEmitter;
20 17
 	RNNStore *_store;
21 18
 }
22 19
 
@@ -37,7 +34,6 @@
37 34
 
38 35
 -(void)bootstrap:(NSURL *)jsCodeLocation launchOptions:(NSDictionary *)launchOptions {
39 36
 	_jsCodeLocation = jsCodeLocation;
40
-	_eventEmitter = [RNNEventEmitter new];
41 37
 	
42 38
 	UIApplication.sharedApplication.delegate.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
43 39
 	UIApplication.sharedApplication.delegate.window.backgroundColor = [UIColor whiteColor];
@@ -56,33 +52,38 @@
56 52
 	return _jsCodeLocation;
57 53
 }
58 54
 
55
+-(void)onJavaScriptWillLoad {
56
+	_store = [RNNStore new];
57
+	[self resetRootViewControllerOnlyOnJSDevReload];
58
+}
59
+
59 60
 -(NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
61
+	RNNEventEmitter *eventEmitter = [[RNNEventEmitter alloc] init];
60 62
 	
61
-	RNNControllerFactory *controllerFactory = [[RNNControllerFactory alloc] initWithRootViewCreator:[RNNReactRootViewCreator new] store:_store];
63
+	RNNControllerFactory *controllerFactory = [[RNNControllerFactory alloc] initWithRootViewCreator:[[RNNReactRootViewCreator alloc]initWithBridge:bridge] store:_store eventEmitter:eventEmitter];
62 64
 	RNNCommandsHandler *commandsHandler = [[RNNCommandsHandler alloc]initWithStore:_store controllerFactory:controllerFactory];
63 65
 	
64 66
 	RNNBridgeModule *bridgeModule = [[RNNBridgeModule alloc] initWithCommandsHandler:commandsHandler];
65
-	RNNEventEmitter *eventEmitter = [[RNNEventEmitter alloc] initWithBridge:bridge];
66 67
 	
67 68
 	return @[bridgeModule,eventEmitter];
68 69
 }
69 70
 
70
-# pragma mark - private
71
-
72
--(void)registerForJsEvents {
73
-	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onJavaScriptLoaded) name:RCTJavaScriptDidLoadNotification object:_bridge];
74
-	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onJavaScriptWillLoad) name:RCTJavaScriptWillStartLoadingNotification	object:_bridge];
71
+-(void)onJavaScriptLoaded {
72
+	_store.isReadyToReceiveCommands = YES;
73
+	[[_bridge moduleForClass:[RNNEventEmitter class]] sendOnAppLaunched];
75 74
 }
76 75
 
76
+# pragma mark - private
77 77
 
78
--(void)onJavaScriptWillLoad {
79
-	_store = [RNNStore new];
80
-	[self resetRootViewControllerOnlyOnJSDevReload];
81
-}
82
-
83
--(void)onJavaScriptLoaded {
84
-	_store.isReadyToReceiveCommands = true;
85
-	[_eventEmitter sendOnAppLaunched];
78
+-(void)registerForJsEvents {
79
+	[[NSNotificationCenter defaultCenter] addObserver:self
80
+											 selector:@selector(onJavaScriptLoaded)
81
+												 name:RCTJavaScriptDidLoadNotification
82
+											   object:nil];
83
+	[[NSNotificationCenter defaultCenter] addObserver:self
84
+											 selector:@selector(onJavaScriptWillLoad)
85
+												 name:RCTJavaScriptWillStartLoadingNotification
86
+											   object:nil];
86 87
 }
87 88
 
88 89
 -(void)resetRootViewControllerOnlyOnJSDevReload {

+ 0
- 1
ios/RNNBridgeModule.h Voir le fichier

@@ -1,6 +1,5 @@
1 1
 #import <Foundation/Foundation.h>
2 2
 #import <UIKit/UIKit.h>
3
-
4 3
 #import <React/RCTBridgeModule.h>
5 4
 
6 5
 #import "RNNCommandsHandler.h"

+ 10
- 12
ios/RNNBridgeModule.m Voir le fichier

@@ -1,10 +1,8 @@
1 1
 #import "RNNBridgeModule.h"
2 2
 
3
-@interface RNNBridgeModule ()
4
-@property RNNCommandsHandler* commandsHandler;
5
-@end
6
-
7
-@implementation RNNBridgeModule
3
+@implementation RNNBridgeModule {
4
+	RNNCommandsHandler* _commandsHandler;
5
+}
8 6
 
9 7
 RCT_EXPORT_MODULE();
10 8
 
@@ -14,34 +12,34 @@ RCT_EXPORT_MODULE();
14 12
 
15 13
 -(instancetype)initWithCommandsHandler:(RNNCommandsHandler *)commandsHandler {
16 14
 	self = [super init];
17
-	self.commandsHandler = commandsHandler;
15
+	_commandsHandler = commandsHandler;
18 16
 	return self;
19 17
 }
20 18
 
21 19
 #pragma mark - JS interface
22 20
 
23 21
 RCT_EXPORT_METHOD(setRoot:(NSDictionary*)layout) {
24
-	[self.commandsHandler setRoot:layout];
22
+	[_commandsHandler setRoot:layout];
25 23
 }
26 24
 
27 25
 RCT_EXPORT_METHOD(push:(NSString*)containerId layout:(NSDictionary*)layout) {
28
-	[self.commandsHandler push:containerId layout:layout];
26
+	[_commandsHandler push:containerId layout:layout];
29 27
 }
30 28
 
31 29
 RCT_EXPORT_METHOD(pop:(NSString*)containerId) {
32
-	[self.commandsHandler pop:containerId];
30
+	[_commandsHandler pop:containerId];
33 31
 }
34 32
 
35 33
 RCT_EXPORT_METHOD(showModal:(NSDictionary*)layout) {
36
-	[self.commandsHandler showModal:layout];
34
+	[_commandsHandler showModal:layout];
37 35
 }
38 36
 
39 37
 RCT_EXPORT_METHOD(dismissModal:(NSString*)containerId) {
40
-	[self.commandsHandler dismissModal:containerId];
38
+	[_commandsHandler dismissModal:containerId];
41 39
 }
42 40
 
43 41
 RCT_EXPORT_METHOD(dismissAllModals) {
44
-	[self.commandsHandler dismissAllModals];
42
+	[_commandsHandler dismissAllModals];
45 43
 }
46 44
 
47 45
 @end

+ 18
- 20
ios/RNNCommandsHandler.m Voir le fichier

@@ -4,17 +4,15 @@
4 4
 #import "RNNModalManager.h"
5 5
 #import "RNNNavigationStackManager.h"
6 6
 
7
-@interface RNNCommandsHandler ()
8
-@property RNNControllerFactory *controllerFactory;
9
-@property RNNStore *store;
10
-@end
11
-
12
-@implementation RNNCommandsHandler
7
+@implementation RNNCommandsHandler {
8
+	RNNControllerFactory *_controllerFactory;
9
+	RNNStore *_store;
10
+}
13 11
 
14 12
 -(instancetype) initWithStore:(RNNStore*)store controllerFactory:(RNNControllerFactory*)controllerFactory {
15 13
 	self = [super init];
16
-	self.store = store;
17
-	self.controllerFactory = controllerFactory;
14
+	_store = store;
15
+	_controllerFactory = controllerFactory;
18 16
 	return self;
19 17
 }
20 18
 
@@ -22,7 +20,7 @@
22 20
 
23 21
 -(void) setRoot:(NSDictionary*)layout {
24 22
 	[self assertReady];
25
-	UIViewController *vc = [self.controllerFactory createLayoutAndSaveToStore:layout];
23
+	UIViewController *vc = [_controllerFactory createLayoutAndSaveToStore:layout];
26 24
 	
27 25
 	UIApplication.sharedApplication.delegate.window.rootViewController = vc;
28 26
 	[UIApplication.sharedApplication.delegate.window makeKeyAndVisible];
@@ -31,47 +29,47 @@
31 29
 -(void) push:(NSString*)containerId layout:(NSDictionary*)layout {
32 30
 	[self assertReady];
33 31
 	
34
-	UIViewController *newVc = [self.controllerFactory createLayoutAndSaveToStore:layout];
32
+	UIViewController *newVc = [_controllerFactory createLayoutAndSaveToStore:layout];
35 33
 	
36 34
 	// find on who to push
37
-	UIViewController *vc = [self.store findContainerForId:containerId];
35
+	UIViewController *vc = [_store findContainerForId:containerId];
38 36
 	
39 37
 	// do the actual pushing
40
-	[[[RNNNavigationStackManager alloc] initWithStore:self.store] push:newVc onTop:vc animated:YES];
38
+	[[[RNNNavigationStackManager alloc] initWithStore:_store] push:newVc onTop:vc animated:YES];
41 39
 }
42 40
 
43 41
 -(void) pop:(NSString*)containerId {
44 42
 	[self assertReady];
45 43
 	
46 44
 	// find who to pop
47
-	UIViewController *vc = [self.store findContainerForId:containerId];
45
+	UIViewController *vc = [_store findContainerForId:containerId];
48 46
 	
49 47
 	// do the popping
50
-	[[[RNNNavigationStackManager alloc] initWithStore:self.store] pop:vc animated:YES];
51
-	[self.store removeContainer:containerId];
48
+	[[[RNNNavigationStackManager alloc] initWithStore:_store] pop:vc animated:YES];
49
+	[_store removeContainer:containerId];
52 50
 }
53 51
 
54 52
 -(void) showModal:(NSDictionary*)layout {
55 53
 	[self assertReady];
56 54
 	
57
-	UIViewController *newVc = [self.controllerFactory createLayoutAndSaveToStore:layout];
58
-	[[[RNNModalManager alloc] initWithStore:self.store] showModal:newVc];
55
+	UIViewController *newVc = [_controllerFactory createLayoutAndSaveToStore:layout];
56
+	[[[RNNModalManager alloc] initWithStore:_store] showModal:newVc];
59 57
 }
60 58
 
61 59
 -(void) dismissModal:(NSString*)containerId {
62 60
 	[self assertReady];
63
-	[[[RNNModalManager alloc] initWithStore:self.store] dismissModal:containerId];
61
+	[[[RNNModalManager alloc] initWithStore:_store] dismissModal:containerId];
64 62
 }
65 63
 
66 64
 -(void) dismissAllModals {
67 65
 	[self assertReady];
68
-	[[[RNNModalManager alloc] initWithStore:self.store] dismissAllModals];
66
+	[[[RNNModalManager alloc] initWithStore:_store] dismissAllModals];
69 67
 }
70 68
 
71 69
 #pragma mark - private
72 70
 
73 71
 -(void) assertReady {
74
-	if (!self.store.isReadyToReceiveCommands) {
72
+	if (!_store.isReadyToReceiveCommands) {
75 73
 		@throw [NSException exceptionWithName:@"BridgeNotLoadedError" reason:@"Bridge not yet loaded! Send commands after Navigation.events().onAppLaunched() has been called." userInfo:nil];
76 74
 	}
77 75
 }

+ 4
- 4
ios/RNNControllerFactory.h Voir le fichier

@@ -2,14 +2,14 @@
2 2
 #import <Foundation/Foundation.h>
3 3
 #import <UIKit/UIKit.h>
4 4
 #import "RNNRootViewCreator.h"
5
-#import "RNNRootViewController.h"
6
-#import "RNNSideMenuController.h"
7
-#import "RNNSideMenuChildVC.h"
8 5
 #import "RNNStore.h"
6
+#import "RNNEventEmitter.h"
9 7
 
10 8
 @interface RNNControllerFactory : NSObject
11 9
 
12
--(instancetype)initWithRootViewCreator:(id <RNNRootViewCreator>)creator store:(RNNStore*)store;
10
+-(instancetype)initWithRootViewCreator:(id <RNNRootViewCreator>)creator
11
+								 store:(RNNStore*)store
12
+						  eventEmitter:(RNNEventEmitter*)eventEmitter;
13 13
 
14 14
 -(UIViewController*)createLayoutAndSaveToStore:(NSDictionary*)layout;
15 15
 

+ 16
- 14
ios/RNNControllerFactory.m Voir le fichier

@@ -1,26 +1,28 @@
1 1
 
2 2
 #import "RNNControllerFactory.h"
3 3
 #import "RNNLayoutNode.h"
4
+#import "RNNRootViewController.h"
5
+#import "RNNSideMenuController.h"
6
+#import "RNNSideMenuChildVC.h"
4 7
 
5 8
 
6
-
7
-@interface RNNControllerFactory ()
8
-
9
-@property (nonatomic, strong) id<RNNRootViewCreator> creator;
10
-@property (nonatomic, strong) RNNStore *store;
11
-
12
-@end
13
-
14
-@implementation RNNControllerFactory
9
+@implementation RNNControllerFactory {
10
+	id<RNNRootViewCreator> _creator;
11
+	RNNStore *_store;
12
+	RNNEventEmitter *_eventEmitter;
13
+}
15 14
 
16 15
 # pragma mark public
17 16
 
18 17
 
19
-- (instancetype)initWithRootViewCreator:(id <RNNRootViewCreator>)creator store:(RNNStore *)store {
18
+- (instancetype)initWithRootViewCreator:(id <RNNRootViewCreator>)creator
19
+								  store:(RNNStore *)store
20
+						   eventEmitter:(RNNEventEmitter*)eventEmitter {
20 21
 	
21 22
 	self = [super init];
22
-	self.creator = creator;
23
-	self.store = store;
23
+	_creator = creator;
24
+	_store = store;
25
+	_eventEmitter = eventEmitter;
24 26
 	
25 27
 	return self;
26 28
 }
@@ -67,13 +69,13 @@
67 69
 		@throw [NSException exceptionWithName:@"UnknownControllerType" reason:[@"Unknown controller type " stringByAppendingString:node.type] userInfo:nil];
68 70
 	}
69 71
 
70
-	[self.store setContainer:result containerId:node.nodeId];
72
+	[_store setContainer:result containerId:node.nodeId];
71 73
 	
72 74
 	return result;
73 75
 }
74 76
 
75 77
 - (RNNRootViewController*)createContainer:(RNNLayoutNode*)node {
76
-	return [[RNNRootViewController alloc] initWithNode:node rootViewCreator:self.creator];
78
+	return [[RNNRootViewController alloc] initWithNode:node rootViewCreator:_creator eventEmitter:_eventEmitter];
77 79
 }
78 80
 
79 81
 - (UINavigationController*)createContainerStack:(RNNLayoutNode*)node {

+ 0
- 2
ios/RNNEventEmitter.h Voir le fichier

@@ -6,8 +6,6 @@
6 6
 
7 7
 @interface RNNEventEmitter : RCTEventEmitter <RCTBridgeModule>
8 8
 
9
--(instancetype)initWithBridge:(RCTBridge*)bridge;
10
-
11 9
 -(void)sendOnAppLaunched;
12 10
 
13 11
 -(void)sendContainerStart:(NSString*)containerId;

+ 7
- 21
ios/RNNEventEmitter.m Voir le fichier

@@ -1,8 +1,6 @@
1 1
 #import "RNNEventEmitter.h"
2 2
 
3
-@implementation RNNEventEmitter {
4
-	RCTBridge *_bridge;
5
-}
3
+@implementation RNNEventEmitter
6 4
 
7 5
 RCT_EXPORT_MODULE();
8 6
 
@@ -10,41 +8,29 @@ static NSString* const onAppLaunched	= @"RNN.appLaunched";
10 8
 static NSString* const containerStart	= @"RNN.containerStart";
11 9
 static NSString* const containerStop	= @"RNN.containerStop";
12 10
 
13
--(instancetype)initWithBridge:(RCTBridge*)bridge {
14
-	self = [super init];
15
-	
16
-	_bridge = bridge;
17
-	
18
-	return self;
19
-}
20 11
 
21
--(NSArray<NSString *> *)supportedEvents
22
-{
12
+-(NSArray<NSString *> *)supportedEvents {
23 13
 	return @[onAppLaunched, containerStart, containerStop];
24 14
 }
25 15
 
26 16
 # pragma mark public
27 17
 
28
--(void)sendOnAppLaunched
29
-{
18
+-(void)sendOnAppLaunched {
30 19
 	[self send:onAppLaunched body:nil];
31 20
 }
32 21
 
33
--(void)sendContainerStart:(NSString *)containerId
34
-{
22
+-(void)sendContainerStart:(NSString *)containerId {
35 23
 	[self send:containerStart body:containerId];
36 24
 }
37 25
 
38
--(void)sendContainerStop:(NSString *)containerId
39
-{
26
+-(void)sendContainerStop:(NSString *)containerId {
40 27
 	[self send:containerStop body:containerId];
41 28
 }
42 29
 
43 30
 # pragma mark private
44 31
 
45
--(void)send:(NSString *)eventName body:(id)body
46
-{
47
-	[[_bridge moduleForClass:[RNNEventEmitter class]] sendEventWithName:eventName body:body];
32
+-(void)send:(NSString *)eventName body:(id)body {
33
+	[self sendEventWithName:eventName body:body];
48 34
 }
49 35
 
50 36
 @end

+ 9
- 13
ios/RNNModalManager.m Voir le fichier

@@ -1,17 +1,13 @@
1 1
 #import "RNNModalManager.h"
2 2
 
3
-@interface RNNModalManager ()
4
-
5
-@property RNNStore *store;
6
-
7
-@end
8
-
9
-@implementation RNNModalManager
3
+@implementation RNNModalManager {
4
+	RNNStore *_store;
5
+}
10 6
 
11 7
 
12 8
 -(instancetype)initWithStore:(RNNStore*)store {
13 9
 	self = [super init];
14
-	self.store = store;
10
+	_store = store;
15 11
 	return self;
16 12
 }
17 13
 
@@ -21,14 +17,14 @@
21 17
 }
22 18
 
23 19
 -(void)dismissModal:(NSString *)containerId {
24
-	[self.store.modalsToDismissArray addObject:containerId];
20
+	[_store.modalsToDismissArray addObject:containerId];
25 21
 	[self removePendingNextModalIfOnTop];
26 22
 }
27 23
 
28 24
 -(void)dismissAllModals {
29 25
 	UIViewController *root = UIApplication.sharedApplication.delegate.window.rootViewController;
30 26
 	[root dismissViewControllerAnimated:YES completion:nil];
31
-	[self.store.modalsToDismissArray removeAllObjects];
27
+	[_store.modalsToDismissArray removeAllObjects];
32 28
 }
33 29
 
34 30
 
@@ -36,9 +32,9 @@
36 32
 
37 33
 
38 34
 -(void)removePendingNextModalIfOnTop {
39
-	NSString *containerId = [self.store.modalsToDismissArray lastObject];
35
+	NSString *containerId = [_store.modalsToDismissArray lastObject];
40 36
 	
41
-	UIViewController *modalToDismiss = [self.store findContainerForId:containerId];
37
+	UIViewController *modalToDismiss = [_store findContainerForId:containerId];
42 38
 	
43 39
 	if(!modalToDismiss) {
44 40
 		return;
@@ -46,7 +42,7 @@
46 42
 	
47 43
 	if (modalToDismiss == [self topPresentedVC]) {
48 44
 		[modalToDismiss dismissViewControllerAnimated:YES completion:^{
49
-			[self.store.modalsToDismissArray removeObject:containerId];
45
+			[_store.modalsToDismissArray removeObject:containerId];
50 46
 			[self removePendingNextModalIfOnTop];
51 47
 		}];
52 48
 	}

+ 4
- 9
ios/RNNNavigationStackManager.m Voir le fichier

@@ -1,18 +1,13 @@
1 1
 #import "RNNNavigationStackManager.h"
2 2
 
3
-@interface RNNNavigationStackManager ()
4
-
5
-@property RNNStore *store;
6
-
7
-@end
8
-
9
-
10
-@implementation RNNNavigationStackManager
3
+@implementation RNNNavigationStackManager {
4
+	RNNStore *_store;
5
+}
11 6
 
12 7
 
13 8
 -(instancetype)initWithStore:(RNNStore*)store {
14 9
 	self = [super init];
15
-	self.store = store;
10
+	_store = store;
16 11
 	return self;
17 12
 }
18 13
 

+ 2
- 0
ios/RNNReactRootViewCreator.h Voir le fichier

@@ -5,4 +5,6 @@
5 5
 
6 6
 @interface RNNReactRootViewCreator : NSObject <RNNRootViewCreator>
7 7
 
8
+-(instancetype)initWithBridge:(RCTBridge*)bridge;
9
+
8 10
 @end

+ 5
- 9
ios/RNNReactRootViewCreator.m Voir le fichier

@@ -3,18 +3,14 @@
3 3
 #import "RNN.h"
4 4
 #import <React/RCTRootView.h>
5 5
 
6
-@interface RNNReactRootViewCreator ()
7
-
8
-@property RCTBridge *bridge;
9
-
10
-@end
11
-
12
-@implementation RNNReactRootViewCreator
6
+@implementation RNNReactRootViewCreator {
7
+	RCTBridge *_bridge;
8
+}
13 9
 
14 10
 -(instancetype)initWithBridge:(RCTBridge*)bridge {
15 11
 	self = [super init];
16 12
 	
17
-	self.bridge = bridge;
13
+	_bridge = bridge;
18 14
 	
19 15
 	return self;
20 16
 	
@@ -25,7 +21,7 @@
25 21
 		@throw [NSException exceptionWithName:@"MissingViewId" reason:@"Missing view id" userInfo:nil];
26 22
 	}
27 23
 	
28
-	UIView *view = [[RCTRootView alloc] initWithBridge:self.bridge
24
+	UIView *view = [[RCTRootView alloc] initWithBridge:_bridge
29 25
 										 moduleName:name
30 26
 								  initialProperties:@{@"id": rootViewId}];
31 27
 	return view;

+ 2
- 3
ios/RNNStore.h Voir le fichier

@@ -2,11 +2,10 @@
2 2
 #import <Foundation/Foundation.h>
3 3
 #import <UIKit/UIKit.h>
4 4
 
5
-
6 5
 @interface RNNStore : NSObject
7 6
 
8
-@property NSMutableArray *modalsToDismissArray;
9
-@property BOOL isReadyToReceiveCommands;
7
+@property (nonatomic, strong) NSMutableArray *modalsToDismissArray;
8
+@property (atomic) BOOL isReadyToReceiveCommands;
10 9
 
11 10
 - (UIViewController*)findContainerForId:(NSString*)containerId;
12 11
 - (void)setContainer:(UIViewController*)viewController containerId:(NSString*)containerId;

+ 7
- 9
ios/RNNStore.m Voir le fichier

@@ -3,23 +3,21 @@
3 3
 
4 4
 @interface RNNStore ()
5 5
 
6
-@property NSMapTable *containerStore;
7
-
8 6
 @end
9 7
 
10
-@implementation RNNStore
11
-
8
+@implementation RNNStore {
9
+	NSMapTable* _containerStore;
10
+}
12 11
 
13 12
 -(instancetype)init {
14 13
 	self = [super init];
15
-	self.containerStore = [NSMapTable strongToWeakObjectsMapTable];
14
+	_containerStore = [NSMapTable strongToWeakObjectsMapTable];
16 15
 	self.modalsToDismissArray = [NSMutableArray new];
17 16
 	return self;
18 17
 }
19 18
 
20
-
21 19
 -(UIViewController *)findContainerForId:(NSString *)containerId {
22
-	return [self.containerStore objectForKey:containerId];
20
+	return [_containerStore objectForKey:containerId];
23 21
 }
24 22
 
25 23
 - (void)setContainer:(UIViewController*)viewController containerId:(NSString*)containerId {
@@ -28,11 +26,11 @@
28 26
 		@throw [NSException exceptionWithName:@"MultipleContainerId" reason:[@"Container id already exists " stringByAppendingString:containerId] userInfo:nil];
29 27
 	}
30 28
 	
31
-	[self.containerStore setObject:viewController forKey:containerId];
29
+	[_containerStore setObject:viewController forKey:containerId];
32 30
 }
33 31
 
34 32
 - (void)removeContainer:(NSString*)containerId {
35
-	[self.containerStore removeObjectForKey:containerId];
33
+	[_containerStore removeObjectForKey:containerId];
36 34
 }
37 35
 
38 36
 

+ 4
- 8
playground/ios/playgroundTests/RNNControllerFactoryTest.m Voir le fichier

@@ -1,13 +1,9 @@
1
-//
2
-//  RNNControllerFactoryTest.m
3
-//  playground
4
-//
5
-//  Created by Ran Greenberg on 08/02/2017.
6
-//  Copyright © 2017 Wix. All rights reserved.
7
-//
8 1
 
9 2
 #import <XCTest/XCTest.h>
10 3
 #import "RNNControllerFactory.h"
4
+#import "RNNRootViewController.h"
5
+#import "RNNSideMenuController.h"
6
+#import "RNNSideMenuChildVC.h"
11 7
 
12 8
 
13 9
 @interface RNNControllerFactoryTest : XCTestCase
@@ -24,7 +20,7 @@
24 20
 	[super setUp];
25 21
 	self.creator = nil;
26 22
 	self.store = [RNNStore new];
27
-	self.factory = [[RNNControllerFactory alloc] initWithRootViewCreator:self.creator store:self.store];
23
+	self.factory = [[RNNControllerFactory alloc] initWithRootViewCreator:self.creator store:self.store eventEmitter:nil];
28 24
 }
29 25
 
30 26
 - (void)tearDown {