Skip to content

Conversation

@bc-lee
Copy link

@bc-lee bc-lee commented Aug 22, 2025

The GetLastSupportedIphoneSimType function was incorrectly returning iPhone 6s Plus
for iOS versions it cannot support (e.g., iOS 18.5), contributing to the broader
issue where outdated iPhone 6s Plus becomes the default simulator device.

Changes:

  • Fix compatibility logic to check both min_os_version AND max_os_version
  • Remove incorrect .reverse() call that caused oldest-first device ordering
  • Update function documentation to reflect correct behavior
  • Add mocked tests with regression protection

The iPhone 6s Plus (max iOS 15.99) should never be returned for iOS 18.5+,
preventing downstream tools from defaulting to this obsolete device.

Related: bazelbuild/rules_apple#2773

bc-lee added 2 commits August 22, 2025 06:59
…for modern iOS

The GetLastSupportedIphoneSimType function was incorrectly returning iPhone 6s Plus
for iOS versions it cannot support (e.g., iOS 18.5), contributing to the broader
issue where outdated iPhone 6s Plus becomes the default simulator device.

Changes:
- Fix compatibility logic to check both min_os_version AND max_os_version
- Remove incorrect .reverse() call that caused oldest-first device ordering
- Update function documentation to reflect correct behavior
- Add mocked tests with regression protection

The iPhone 6s Plus (max iOS 15.99) should never be returned for iOS 18.5+,
preventing downstream tools from defaulting to this obsolete device.
@bc-lee
Copy link
Author

bc-lee commented Aug 22, 2025

The first commit actually belongs to another issue, #73, but it needs to be included to handle these test cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant