Repository navigation
feat(device_info_plus): Add iOS device identifier for iPhone Duo - #4007
Open
norman93sun wants to merge 1 commit into
Open
norman93sun wants to merge 1 commit into
norman93sun wants to merge 1 commit into
Conversation
iPhone19,4 is iPhone Duo. Without this mapping, modelName returns "Unknown device" on that phone.
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
Adds the iOS device identifier of the iPhone Duo. Without it
IosDeviceInfo.modelNamereturnsUnknown deviceon that phone.#3993 added iPhone 18 Pro (
iPhone19,2) and iPhone 18 Pro Max (iPhone19,3,iPhone19,7) and leftiPhone19,4out, because the macOS 27.0 device table listed it with no marketing name yet. Xcode 27.1 names that identifier iPhone Duo.The identifier and name come from:
modelIdentifieriPhone19,4, product classV68, name iPhone Duo.iPhone19,4as iPhone Duo.iPhone19,4 : iPhone Duo.iPhone19,1,iPhone19,5, andiPhone19,6are left out. They still have no confirmed marketing name, and this change keeps them asUnknown device.How it was checked:
DeviceIdentifiers.mcompiles with-Wall -Werrorfor the iOS device SDK and the simulator SDK. A small harness calling+userKnownDeviceModel:returnsiPhone DuoforiPhone19,4, still returnsUnknown deviceforiPhone19,1, and returns the same names as before foriPhone19,2,iPhone19,3,iPhone19,7, andiPhone18,4. No Dart sources,CHANGELOG.md, or plugin version were changed.Related Issues
None.
Checklist
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles.flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!in the title as explained in Conventional Commits).