Reland Replace ideviceinfo and idevice_id with xcdevice#50252
Merged
jmagman merged 2 commits intoflutter:masterfrom Feb 6, 2020
Merged
Reland Replace ideviceinfo and idevice_id with xcdevice#50252jmagman merged 2 commits intoflutter:masterfrom
jmagman merged 2 commits intoflutter:masterfrom
Conversation
jmagman
commented
Feb 6, 2020
Comment on lines
+332
to
+339
| final int code = _errorCode(errorProperties); | ||
|
|
||
| // Temporary error -10: iPhone is busy: Preparing debugger support for iPhone. | ||
| // Sometimes the app launch will fail on these devices until Xcode is done setting up the device. | ||
| // Other times this is a false positive and the app will successfully launch despite the error. | ||
| if (code != -10) { | ||
| continue; | ||
| } |
Member
Author
There was a problem hiding this comment.
This is the changed logic.
Member
There was a problem hiding this comment.
Does the new logic have a test?
Member
Author
There was a problem hiding this comment.
Yes, though GitHub decided to collapse xcode_test.dart. See 'ignores "Preparing debugger support for iPhone" error'.
zanderso
approved these changes
Feb 6, 2020
Member
Author
|
Landed on red, fuchsia infra failure. |
|
running |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Reland #49854. Ignore false positive "Preparing debugger support for iPhone" -10 error message since usually the app launches fine after giving that error.
Xcode ships with a command line tool called
xcdevicethat produces a json array of all available devices, including iOS devices that can be deployed via Xcode over the network (Connect via network checkbox). This PR filters out these network devices, but it's relevant to someday fixing #15072.I checked to make sure
xcdeviceis available in Xcode 10.2 (minimum Xcode required by Flutter) and later.Example output:
{ "simulator" : false, "operatingSystemVersion" : "13.3 (17C54)", "interface" : "usb", "available" : true, "platform" : "com.apple.platform.iphoneos", "modelCode" : "iPhone8,1", "identifier" : "d83d5bc53967baa0ee18626ba87b6254b2ab5418", "architecture" : "arm64", "modelName" : "iPhone 6s", "name" : "iPhone" }Since this provides the identifier, name, operating system, and architecture, we can get rid of all usages of
idevice_idandideviceinfo(cleanup happening in the next PR since this one was already getting too big).Also, show any connection errors in doctor instead of crashing. Example:
Related Issues
Part of #6118
Precursor to #15072 (will make networked devices discoverable when we stop filtering "network" interfaces).
Fixes #49375
Fixes #36524
Fixes #47727
Fixes #43398
Fixes #48057
Supersedes #49626
Supersedes #45657
Supersedes part of #36902?
Tests
xcode_test, devices_test
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change