Skip to content

Commit af63c1f

Browse files
Killavusthymikee
authored andcommitted
Reintroduce tvOS as valid simulator version when matching for simulators (#1929)
* reintroduce tvOS as valid target when matching simulators * reintroduce matching of Apple TV devices test
1 parent 0f4bf8e commit af63c1f

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

packages/cli-platform-ios/src/tools/__tests__/findMatchingSimulator.test.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,4 +1027,41 @@ describe('findMatchingSimulator', () => {
10271027
version: 'iOS 16.0',
10281028
});
10291029
});
1030+
1031+
it('should return AppleTV devices if in the list', () => {
1032+
expect(
1033+
findMatchingSimulator(
1034+
{
1035+
devices: {
1036+
'com.apple.CoreSimulator.SimRuntime.tvOS-11-2': [
1037+
{
1038+
state: 'Booted',
1039+
availability: '(available)',
1040+
name: 'Apple TV',
1041+
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
1042+
},
1043+
{
1044+
state: 'Shutdown',
1045+
availability: '(available)',
1046+
name: 'Apple TV 4K',
1047+
udid: 'BCBB7E4B-D872-4D61-BC61-7C9805551075',
1048+
},
1049+
{
1050+
state: 'Shutdown',
1051+
availability: '(available)',
1052+
name: 'Apple TV 4K (at 1080p)',
1053+
udid: '1DE12308-1C14-4F0F-991E-A3ADC41BDFFC',
1054+
},
1055+
],
1056+
},
1057+
},
1058+
{simulator: 'Apple TV'},
1059+
),
1060+
).toEqual({
1061+
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
1062+
name: 'Apple TV',
1063+
booted: true,
1064+
version: 'tvOS 11.2',
1065+
});
1066+
});
10301067
});

packages/cli-platform-ios/src/tools/findMatchingSimulator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function findMatchingSimulator(
6666
}
6767

6868
// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc)
69-
if (!version.includes('iOS')) {
69+
if (!version.includes('iOS') && !version.includes('tvOS')) {
7070
continue;
7171
}
7272
if (simulatorVersion && !version.endsWith(simulatorVersion)) {

0 commit comments

Comments
 (0)