Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce tvOS as valid simulator version when matching for simulators #1929

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1027,4 +1027,41 @@ describe('findMatchingSimulator', () => {
version: 'iOS 16.0',
});
});

it('should return AppleTV devices if in the list', () => {
expect(
findMatchingSimulator(
{
devices: {
'com.apple.CoreSimulator.SimRuntime.tvOS-11-2': [
{
state: 'Booted',
availability: '(available)',
name: 'Apple TV',
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
},
{
state: 'Shutdown',
availability: '(available)',
name: 'Apple TV 4K',
udid: 'BCBB7E4B-D872-4D61-BC61-7C9805551075',
},
{
state: 'Shutdown',
availability: '(available)',
name: 'Apple TV 4K (at 1080p)',
udid: '1DE12308-1C14-4F0F-991E-A3ADC41BDFFC',
},
],
},
},
{simulator: 'Apple TV'},
),
).toEqual({
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
name: 'Apple TV',
booted: true,
version: 'tvOS 11.2',
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function findMatchingSimulator(
}

// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc)
if (!version.includes('iOS')) {
if (!version.includes('iOS') && !version.includes('tvOS')) {
continue;
}
if (simulatorVersion && !version.endsWith(simulatorVersion)) {
Expand Down