Repository navigation
Conversation
hw.model reports Mac minis as "Macmini<N>,<M>" (lowercase "m"), but the lookup table used "MacMini", so modelName fell through to "Unknown Model" for Mac mini 2012-2020. Use the identifiers as reported. Fixes fluttercommunity#4017 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
hw.modelreturnsMacmini9,1(lowercase m), but the lookup table hadMacMini9,1. Swift string matching is case-sensitive, so Mac minis from 2012 to 2020 showed up as "Unknown Model". This just fixes the fourcaselines. The other model families were already correct.I tested it by compiling
DeviceIdentifiers.swiftwith a small script: before the change all five Mac mini IDs gave "Unknown Model", and after it they give the right names. There's no Swift test target for this file, but I can add one if you want.Related Issues
Checklist
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles.flutter analyze) does not report any problems on my PR.Breaking Change