Browse Source

Merge options with correct child (#6041)

Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
Yogev Ben David 4 years ago
parent
commit
3c38c50a8b
No account linked to committer's email address

+ 2
- 2
lib/ios/RNNBottomTabsController.m View File

38
 
38
 
39
 - (void)mergeChildOptions:(RNNNavigationOptions *)options child:(UIViewController *)child {
39
 - (void)mergeChildOptions:(RNNNavigationOptions *)options child:(UIViewController *)child {
40
     [super mergeChildOptions:options child:child];
40
     [super mergeChildOptions:options child:child];
41
-    [_bottomTabPresenter mergeOptions:options resolvedOptions:self.resolveOptions child:[self findViewController:child]];
42
-    [_dotIndicatorPresenter mergeOptions:options resolvedOptions:self.resolveOptions child:[self findViewController:child]];
41
+    [_bottomTabPresenter mergeOptions:options resolvedOptions:child.resolveOptions child:[self findViewController:child]];
42
+    [_dotIndicatorPresenter mergeOptions:options resolvedOptions:child.resolveOptions child:[self findViewController:child]];
43
 }
43
 }
44
 
44
 
45
 - (id<UITabBarControllerDelegate>)delegate {
45
 - (id<UITabBarControllerDelegate>)delegate {

+ 42
- 23
playground/ios/NavigationTests/RNNCommandsHandlerTest.m View File

10
 #import "RNNLayoutManager.h"
10
 #import "RNNLayoutManager.h"
11
 #import "RNNBottomTabsController.h"
11
 #import "RNNBottomTabsController.h"
12
 #import "BottomTabsAttachModeFactory.h"
12
 #import "BottomTabsAttachModeFactory.h"
13
-
14
-@interface MockUIApplication : NSObject
15
-
16
--(UIWindow *)keyWindow;
17
-
18
-@end
19
-
20
-@implementation MockUIApplication
21
-
22
-- (UIWindow *)keyWindow {
23
-	return [UIWindow new];
24
-}
25
-
26
-@end
13
+#import <ReactNativeNavigation/BottomTabPresenterCreator.h>
14
+#import "RNNComponentViewController+Utils.h"
27
 
15
 
28
 @interface MockUINavigationController : RNNStackController
16
 @interface MockUINavigationController : RNNStackController
29
 @property (nonatomic, strong) NSArray* willReturnVCs;
17
 @property (nonatomic, strong) NSArray* willReturnVCs;
62
 
50
 
63
 - (void)setUp {
51
 - (void)setUp {
64
 	[super setUp];
52
 	[super setUp];
65
-	self.sharedApplication = [OCMockObject mockForClass:[UIApplication class]];
66
 	self.creator = [OCMockObject partialMockForObject:[RNNTestRootViewCreator new]];
53
 	self.creator = [OCMockObject partialMockForObject:[RNNTestRootViewCreator new]];
67
 	self.mainWindow = [OCMockObject partialMockForObject:[UIWindow new]];
54
 	self.mainWindow = [OCMockObject partialMockForObject:[UIWindow new]];
68
 	self.eventEmmiter = [OCMockObject partialMockForObject:[RNNEventEmitter new]];
55
 	self.eventEmmiter = [OCMockObject partialMockForObject:[RNNEventEmitter new]];
75
 	self.vc3 = [self generateComponentWithComponentId:@"3"];
62
 	self.vc3 = [self generateComponentWithComponentId:@"3"];
76
 	_nvc = [[MockUINavigationController alloc] init];
63
 	_nvc = [[MockUINavigationController alloc] init];
77
 	[_nvc setViewControllers:@[self.vc1, self.vc2, self.vc3]];
64
 	[_nvc setViewControllers:@[self.vc1, self.vc2, self.vc3]];
78
-	OCMStub([self.sharedApplication keyWindow]).andReturn(self.mainWindow);
65
+	
66
+	UIApplication* sharedApplication = [OCMockObject niceMockForClass:[UIApplication class]];
67
+	id mockedApplicationClass = OCMClassMock([UIApplication class]);
68
+	OCMStub(ClassMethod([mockedApplicationClass sharedApplication])).andReturn(sharedApplication);
69
+	OCMStub(sharedApplication.keyWindow).andReturn(self.mainWindow);
70
+	OCMStub([sharedApplication windows]).andReturn(@[self.mainWindow]);
79
 }
71
 }
80
 
72
 
81
 - (RNNComponentViewController *)generateComponentWithComponentId:(NSString *)componentId {
73
 - (RNNComponentViewController *)generateComponentWithComponentId:(NSString *)componentId {
129
 -(void)testDynamicStylesMergeWithStaticStyles {
121
 -(void)testDynamicStylesMergeWithStaticStyles {
130
 	RNNNavigationOptions* initialOptions = [[RNNNavigationOptions alloc] initWithDict:@{}];
122
 	RNNNavigationOptions* initialOptions = [[RNNNavigationOptions alloc] initWithDict:@{}];
131
 	initialOptions.topBar.title.text = [[Text alloc] initWithValue:@"the title"];
123
 	initialOptions.topBar.title.text = [[Text alloc] initWithValue:@"the title"];
132
-	RNNLayoutInfo* layoutInfo = [RNNLayoutInfo new];
133
 	RNNTestRootViewCreator* creator = [[RNNTestRootViewCreator alloc] init];
124
 	RNNTestRootViewCreator* creator = [[RNNTestRootViewCreator alloc] init];
134
-	
135
-	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] initWithComponentRegistry:nil defaultOptions:nil];
136
-	RNNComponentViewController* vc = [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:creator eventEmitter:nil presenter:presenter options:initialOptions defaultOptions:nil];
125
+	RNNComponentViewController* vc = [RNNComponentViewController createWithComponentId:@"componentId" initialOptions:initialOptions];
137
 	
126
 	
138
 	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:creator options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[[RNNStackPresenter alloc] init] eventEmitter:nil childViewControllers:@[vc]];
127
 	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:creator options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[[RNNStackPresenter alloc] init] eventEmitter:nil childViewControllers:@[vc]];
139
-	
128
+	[self.mainWindow setRootViewController:nav];
140
 	[vc viewWillAppear:false];
129
 	[vc viewWillAppear:false];
141
 	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
130
 	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
142
 	
131
 	
146
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
135
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
147
 	
136
 	
148
 	[self.uut mergeOptions:@"componentId" options:dictFromJs completion:^{
137
 	[self.uut mergeOptions:@"componentId" options:dictFromJs completion:^{
149
-		XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
150
-		XCTAssertTrue([nav.navigationBar.barTintColor isEqual:expectedColor]);
138
+		
151
 	}];
139
 	}];
140
+	
141
+	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
142
+	XCTAssertTrue([vc.navigationItem.standardAppearance.backgroundColor isEqual:expectedColor]);
152
 }
143
 }
153
 
144
 
154
 - (void)testMergeOptions_shouldOverrideOptions {
145
 - (void)testMergeOptions_shouldOverrideOptions {
420
 	XCTAssertTrue(_vc2.isViewLoaded);
411
 	XCTAssertTrue(_vc2.isViewLoaded);
421
 }
412
 }
422
 
413
 
414
+- (void)testMergeOptions_shouldMergeWithChildOnly {
415
+	[self.uut setReadyToReceiveCommands:true];
416
+	NSDictionary* mergeOptions = @{@"bottomTab": @{@"badge": @"Badge"}};
417
+	
418
+	RNNNavigationOptions* firstChildOptions = [RNNNavigationOptions emptyOptions];
419
+	firstChildOptions.bottomTab.text = [Text withValue:@"First"];
420
+	RNNNavigationOptions* secondChildOptions = [RNNNavigationOptions emptyOptions];
421
+	secondChildOptions.bottomTab.text = [Text withValue:@"Second"];
422
+	
423
+	RNNComponentViewController* firstChild = [RNNComponentViewController createWithComponentId:@"first" initialOptions:firstChildOptions];
424
+	RNNComponentViewController* secondChild = [RNNComponentViewController createWithComponentId:@"second" initialOptions:secondChildOptions];
425
+	
426
+	RNNBottomTabsController* tabBarController = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[RNNNavigationOptions emptyOptions] defaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions] presenter:[RNNBasePresenter new] bottomTabPresenter:[BottomTabPresenterCreator createWithDefaultOptions:[RNNNavigationOptions emptyOptions]] dotIndicatorPresenter:nil eventEmitter:_eventEmmiter childViewControllers:@[firstChild, secondChild] bottomTabsAttacher:nil];
427
+	
428
+	OCMStub([self.controllerFactory createLayout:[OCMArg any]]).andReturn(tabBarController);
429
+	[self.mainWindow setRootViewController:tabBarController];
430
+	[secondChild viewWillAppear:YES];
431
+	
432
+	[self.uut mergeOptions:secondChild.layoutInfo.componentId options:mergeOptions completion:^{
433
+		
434
+	}];
435
+	
436
+	XCTAssertTrue([secondChild.tabBarItem.badgeValue isEqualToString:@"Badge"]);
437
+	XCTAssertNil(firstChild.tabBarItem.badgeValue);
438
+	XCTAssertTrue([firstChild.tabBarItem.title isEqualToString:@"First"]);
439
+	XCTAssertTrue([secondChild.tabBarItem.title isEqualToString:@"Second"]);
440
+}
441
+
423
 - (void)testShowModal_shouldShowAnimated {
442
 - (void)testShowModal_shouldShowAnimated {
424
 	[self.uut setReadyToReceiveCommands:true];
443
 	[self.uut setReadyToReceiveCommands:true];
425
 	self.vc1.options = [[RNNNavigationOptions alloc] initEmptyOptions];
444
 	self.vc1.options = [[RNNNavigationOptions alloc] initEmptyOptions];

+ 1
- 1
playground/ios/NavigationTests/RNNLayoutManagerTest.m View File

26
 	_secondWindow = [[UIWindow alloc] init];
26
 	_secondWindow = [[UIWindow alloc] init];
27
 	NSArray* windows = @[_firstWindow, _secondWindow];
27
 	NSArray* windows = @[_firstWindow, _secondWindow];
28
 	
28
 	
29
-	UIApplication* sharedApplication = [OCMockObject mockForClass:[UIApplication class]];
29
+	UIApplication* sharedApplication = [OCMockObject niceMockForClass:[UIApplication class]];
30
 	id mockedApplicationClass = OCMClassMock([UIApplication class]);
30
 	id mockedApplicationClass = OCMClassMock([UIApplication class]);
31
 	OCMStub(ClassMethod([mockedApplicationClass sharedApplication])).andReturn(sharedApplication);
31
 	OCMStub(ClassMethod([mockedApplicationClass sharedApplication])).andReturn(sharedApplication);
32
 	OCMStub(sharedApplication.keyWindow).andReturn(_firstWindow);
32
 	OCMStub(sharedApplication.keyWindow).andReturn(_firstWindow);

+ 2
- 0
playground/ios/NavigationTests/utils/RNNComponentViewController+Utils.h View File

5
 
5
 
6
 + (RNNComponentViewController *)createWithComponentId:(NSString *)componentId;
6
 + (RNNComponentViewController *)createWithComponentId:(NSString *)componentId;
7
 
7
 
8
++ (RNNComponentViewController *)createWithComponentId:(NSString *)componentId initialOptions:(RNNNavigationOptions *)initialOptions;
9
+
8
 @end
10
 @end

+ 7
- 2
playground/ios/NavigationTests/utils/RNNComponentViewController+Utils.m View File

1
 #import "RNNComponentViewController+Utils.h"
1
 #import "RNNComponentViewController+Utils.h"
2
+#import "RNNTestRootViewCreator.h"
2
 
3
 
3
 @implementation RNNComponentViewController (Utils)
4
 @implementation RNNComponentViewController (Utils)
4
 
5
 
5
-+ (RNNComponentViewController *)createWithComponentId:(NSString *)componentId {
6
++ (RNNComponentViewController *)createWithComponentId:(NSString *)componentId initialOptions:(RNNNavigationOptions *)initialOptions {
6
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init];
7
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init];
7
 	layoutInfo.componentId = componentId;
8
 	layoutInfo.componentId = componentId;
8
-	return [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:nil eventEmitter:nil presenter:nil options:nil defaultOptions:nil];
9
+	return [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:[[RNNTestRootViewCreator alloc] init] eventEmitter:nil presenter:[[RNNComponentPresenter alloc] initWithComponentRegistry:nil defaultOptions:nil] options:initialOptions defaultOptions:nil];
10
+}
11
+
12
++ (RNNComponentViewController *)createWithComponentId:(NSString *)componentId {
13
+	return [self createWithComponentId:componentId initialOptions:nil];
9
 }
14
 }
10
 
15
 
11
 @end
16
 @end

+ 11
- 3
playground/ios/playground.xcodeproj/project.pbxproj View File

21
 		50996C6923AA487800008F89 /* RNNTestRootViewCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263D2385888C003F36BA /* RNNTestRootViewCreator.m */; };
21
 		50996C6923AA487800008F89 /* RNNTestRootViewCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263D2385888C003F36BA /* RNNTestRootViewCreator.m */; };
22
 		50BCB27623F1A2B100D6C8E5 /* TopBarAppearancePresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50BCB27523F1A26600D6C8E5 /* TopBarAppearancePresenterTest.m */; };
22
 		50BCB27623F1A2B100D6C8E5 /* TopBarAppearancePresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50BCB27523F1A26600D6C8E5 /* TopBarAppearancePresenterTest.m */; };
23
 		50C9A8D1240EB95F00BD699F /* RNNBottomTabsController+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */; };
23
 		50C9A8D1240EB95F00BD699F /* RNNBottomTabsController+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */; };
24
-		50CF233D240695B10098042D /* RNNBottomTabsController+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */; };
25
 		50C9A8D4240FB9D000BD699F /* RNNComponentViewController+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 50C9A8D3240FB9D000BD699F /* RNNComponentViewController+Utils.m */; };
24
 		50C9A8D4240FB9D000BD699F /* RNNComponentViewController+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 50C9A8D3240FB9D000BD699F /* RNNComponentViewController+Utils.m */; };
25
+		50CF233D240695B10098042D /* RNNBottomTabsController+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */; };
26
 		67C681D42B662A53F29C19DA /* Pods_NavigationIOS12Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEE0B5D45FD34FBABC6586CF /* Pods_NavigationIOS12Tests.framework */; };
26
 		67C681D42B662A53F29C19DA /* Pods_NavigationIOS12Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEE0B5D45FD34FBABC6586CF /* Pods_NavigationIOS12Tests.framework */; };
27
 		9D204F3DC4FBCD81583BF99F /* Pods_playground.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A3340545EAAF11C1F146864 /* Pods_playground.framework */; };
27
 		9D204F3DC4FBCD81583BF99F /* Pods_playground.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A3340545EAAF11C1F146864 /* Pods_playground.framework */; };
28
 		E5046080227748EA00212BD8 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E504607F227748EA00212BD8 /* JavaScriptCore.framework */; };
28
 		E5046080227748EA00212BD8 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E504607F227748EA00212BD8 /* JavaScriptCore.framework */; };
97
 		50996C6123AA46DD00008F89 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
97
 		50996C6123AA46DD00008F89 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
98
 		50996C6723AA477400008F89 /* RNNRootViewControllerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNRootViewControllerTest.m; sourceTree = "<group>"; };
98
 		50996C6723AA477400008F89 /* RNNRootViewControllerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNRootViewControllerTest.m; sourceTree = "<group>"; };
99
 		50BCB27523F1A26600D6C8E5 /* TopBarAppearancePresenterTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TopBarAppearancePresenterTest.m; sourceTree = "<group>"; };
99
 		50BCB27523F1A26600D6C8E5 /* TopBarAppearancePresenterTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TopBarAppearancePresenterTest.m; sourceTree = "<group>"; };
100
-		50CF233B240695B10098042D /* RNNBottomTabsController+Helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNNBottomTabsController+Helpers.h"; sourceTree = "<group>"; };
101
-		50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNNBottomTabsController+Helpers.m"; sourceTree = "<group>"; };
102
 		50C9A8D2240FB9D000BD699F /* RNNComponentViewController+Utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNNComponentViewController+Utils.h"; sourceTree = "<group>"; };
100
 		50C9A8D2240FB9D000BD699F /* RNNComponentViewController+Utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNNComponentViewController+Utils.h"; sourceTree = "<group>"; };
103
 		50C9A8D3240FB9D000BD699F /* RNNComponentViewController+Utils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNNComponentViewController+Utils.m"; sourceTree = "<group>"; };
101
 		50C9A8D3240FB9D000BD699F /* RNNComponentViewController+Utils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNNComponentViewController+Utils.m"; sourceTree = "<group>"; };
102
+		50CF233B240695B10098042D /* RNNBottomTabsController+Helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNNBottomTabsController+Helpers.h"; sourceTree = "<group>"; };
103
+		50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNNBottomTabsController+Helpers.m"; sourceTree = "<group>"; };
104
 		7F8E255E2E08F6ECE7DF6FE3 /* Pods-playground.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.release.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.release.xcconfig"; sourceTree = "<group>"; };
104
 		7F8E255E2E08F6ECE7DF6FE3 /* Pods-playground.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.release.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.release.xcconfig"; sourceTree = "<group>"; };
105
 		84E32151E3A71C2B7328BCB4 /* Pods_NavigationTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NavigationTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
105
 		84E32151E3A71C2B7328BCB4 /* Pods_NavigationTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NavigationTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
106
 		B484A10A046B0046B98A76B5 /* Pods-playground.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.debug.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.debug.xcconfig"; sourceTree = "<group>"; };
106
 		B484A10A046B0046B98A76B5 /* Pods-playground.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.debug.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.debug.xcconfig"; sourceTree = "<group>"; };
399
 					50996C5C23AA46DD00008F89 = {
399
 					50996C5C23AA46DD00008F89 = {
400
 						CreatedOnToolsVersion = 11.2.1;
400
 						CreatedOnToolsVersion = 11.2.1;
401
 						ProvisioningStyle = Automatic;
401
 						ProvisioningStyle = Automatic;
402
+						TestTargetID = 13B07F861A680F5B00A75B9A;
402
 					};
403
 					};
403
 					E58D261A238587F4003F36BA = {
404
 					E58D261A238587F4003F36BA = {
404
 						CreatedOnToolsVersion = 11.2.1;
405
 						CreatedOnToolsVersion = 11.2.1;
405
 						DevelopmentTeam = S3GLW74Y8N;
406
 						DevelopmentTeam = S3GLW74Y8N;
406
 						ProvisioningStyle = Automatic;
407
 						ProvisioningStyle = Automatic;
408
+						TestTargetID = 13B07F861A680F5B00A75B9A;
407
 					};
409
 					};
408
 				};
410
 				};
409
 			};
411
 			};
892
 				PRODUCT_BUNDLE_IDENTIFIER = rn.NavigationIOS12Tests;
894
 				PRODUCT_BUNDLE_IDENTIFIER = rn.NavigationIOS12Tests;
893
 				PRODUCT_NAME = "$(TARGET_NAME)";
895
 				PRODUCT_NAME = "$(TARGET_NAME)";
894
 				TARGETED_DEVICE_FAMILY = "1,2";
896
 				TARGETED_DEVICE_FAMILY = "1,2";
897
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/playground.app/playground";
895
 			};
898
 			};
896
 			name = Debug;
899
 			name = Debug;
897
 		};
900
 		};
916
 				PRODUCT_BUNDLE_IDENTIFIER = rn.NavigationIOS12Tests;
919
 				PRODUCT_BUNDLE_IDENTIFIER = rn.NavigationIOS12Tests;
917
 				PRODUCT_NAME = "$(TARGET_NAME)";
920
 				PRODUCT_NAME = "$(TARGET_NAME)";
918
 				TARGETED_DEVICE_FAMILY = "1,2";
921
 				TARGETED_DEVICE_FAMILY = "1,2";
922
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/playground.app/playground";
919
 			};
923
 			};
920
 			name = Release;
924
 			name = Release;
921
 		};
925
 		};
1026
 			isa = XCBuildConfiguration;
1030
 			isa = XCBuildConfiguration;
1027
 			baseConfigurationReference = 4259AF43A23D928FE78B4A3A /* Pods-NavigationTests.debug.xcconfig */;
1031
 			baseConfigurationReference = 4259AF43A23D928FE78B4A3A /* Pods-NavigationTests.debug.xcconfig */;
1028
 			buildSettings = {
1032
 			buildSettings = {
1033
+				BUNDLE_LOADER = "$(TEST_HOST)";
1029
 				CLANG_ANALYZER_NONNULL = YES;
1034
 				CLANG_ANALYZER_NONNULL = YES;
1030
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1035
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1031
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1036
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1044
 				PRODUCT_BUNDLE_IDENTIFIER = com.wix.NavigationTests;
1049
 				PRODUCT_BUNDLE_IDENTIFIER = com.wix.NavigationTests;
1045
 				PRODUCT_NAME = "$(TARGET_NAME)";
1050
 				PRODUCT_NAME = "$(TARGET_NAME)";
1046
 				TARGETED_DEVICE_FAMILY = "1,2";
1051
 				TARGETED_DEVICE_FAMILY = "1,2";
1052
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/playground.app/playground";
1047
 			};
1053
 			};
1048
 			name = Debug;
1054
 			name = Debug;
1049
 		};
1055
 		};
1051
 			isa = XCBuildConfiguration;
1057
 			isa = XCBuildConfiguration;
1052
 			baseConfigurationReference = D95A99C17C65D674BA9DF26B /* Pods-NavigationTests.release.xcconfig */;
1058
 			baseConfigurationReference = D95A99C17C65D674BA9DF26B /* Pods-NavigationTests.release.xcconfig */;
1053
 			buildSettings = {
1059
 			buildSettings = {
1060
+				BUNDLE_LOADER = "$(TEST_HOST)";
1054
 				CLANG_ANALYZER_NONNULL = YES;
1061
 				CLANG_ANALYZER_NONNULL = YES;
1055
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1062
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1056
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1063
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1069
 				PRODUCT_BUNDLE_IDENTIFIER = com.wix.NavigationTests;
1076
 				PRODUCT_BUNDLE_IDENTIFIER = com.wix.NavigationTests;
1070
 				PRODUCT_NAME = "$(TARGET_NAME)";
1077
 				PRODUCT_NAME = "$(TARGET_NAME)";
1071
 				TARGETED_DEVICE_FAMILY = "1,2";
1078
 				TARGETED_DEVICE_FAMILY = "1,2";
1079
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/playground.app/playground";
1072
 			};
1080
 			};
1073
 			name = Release;
1081
 			name = Release;
1074
 		};
1082
 		};