-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Reland Replace ideviceinfo and idevice_id with xcdevice #50252
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
Conversation
| 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; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the changed logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the new logic have a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, though GitHub decided to collapse xcode_test.dart. See 'ignores "Preparing debugger support for iPhone" error'.
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Landed on red, fuchsia infra failure. |
|
running |
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