-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Use Xcode instruments to list devices #10801
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
Eliminates the dependency on idevice_id from libimobiledevice. Instead, uses Xcode built-in functionality.
| // | ||
| // my-mac-pro [2C10513E-4dA5-405C-8EF5-C44353DB3ADD] | ||
| // My iPhone (10.3.2) [75b90e947c5f429fa67f3e9169fda0d89f0492f1] | ||
| // iPhone 6s (9.3) [F6CEE7CF-81EB-4448-81B4-1755288C7C11] (Simulator) |
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 regex won't catch this because of the trailing " (Simulator)"
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.
Yep, we only want real devices. Simulators should be discarded. Updated the comment.
| // my-mac-pro [2C10513E-4dA5-405C-8EF5-C44353DB3ADD] | ||
| // My iPhone (10.3.2) [75b90e947c5f429fa67f3e9169fda0d89f0492f1] | ||
| // iPhone 6s (9.3) [F6CEE7CF-81EB-4448-81B4-1755288C7C11] (Simulator) | ||
| static final RegExp _deviceRegex = new RegExp(r'(.*) +\((.*)\) +\[(.*)]$'); |
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.
\]
And my OCD really wants a ^ at the beginning :-)
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.
Done.
| // iPhone 6s (9.3) [F6CEE7CF-81EB-4448-81B4-1755288C7C11] (Simulator) | ||
| static final RegExp _deviceRegex = new RegExp(r'(.*) +\((.*)\) +\[(.*)]$'); | ||
|
|
||
| static List<IOSDevice> getAttachedDevices() { |
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.
It looks like it might not be too bad to make this a Stream<IOSDevice>?
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.
I like it. I'll put together a follow-up PR.
This reverts commit 37bb5f1. Instruments worked well when this was originally landed, and on the following commit, but started failing two commits after this originall landed. Manual invocation of instruments on the build host currently results in: dyld: Library not loaded: @rpath/InstrumentsAnalysisCore.framework/Versions/A/InstrumentsAnalysisCore Referenced from: /Applications/Xcode8.0.app/Contents/Developer/usr/bin/instruments Reason: image not found Abort trap: 6 It appears the /Applications/Xcode8.0.app/Contents/Applications directory (which contains Instruments) is missing on the host.
* Revert "Make device discovery asynchronous (#10803)" This reverts commit 972be9c. * Revert "Use Xcode instruments to list devices (#10801)" This reverts commit 37bb5f1. This is to resolve a failure that looks related to a bad install of Xcode 8.0 on our build bots and should be reinstated when the infra issue is diagnosed and resolved. Instruments worked well when this was originally landed, and on the following commit, but started failing two commits after this originally landed. Manual invocation of instruments on the build host currently results in: ``` dyld: Library not loaded: @rpath/InstrumentsAnalysisCore.framework/Versions/A/InstrumentsAnalysisCore Referenced from: /Applications/Xcode8.0.app/Contents/Developer/usr/bin/instruments Reason: image not found Abort trap: 6 ``` It appears the /Applications/Xcode8.0.app/Contents/Applications directory (which contains Instruments) is missing on the host.
This reverts commit b2909a2. This resubmits the following patches: 1. Use Xcode instruments to list devices (flutter#10801) Eliminates the dependency on idevice_id from libimobiledevice. Instead, uses Xcode built-in functionality. 2. Make device discovery asynchronous (flutter#10803) Migrates DeviceDiscovery.devices and all device-specific lookup to be asynchronous.
This reverts commit b2909a2. This resubmits the following patches: 1. Use Xcode instruments to list devices (#10801) Eliminates the dependency on idevice_id from libimobiledevice. Instead, uses Xcode built-in functionality. 2. Make device discovery asynchronous (#10803) Migrates DeviceDiscovery.devices and all device-specific lookup to be asynchronous.
Eliminates the dependency on idevice_id from libimobiledevice. Instead, uses Xcode built-in functionality.
* Revert "Make device discovery asynchronous (flutter#10803)" This reverts commit 972be9c. * Revert "Use Xcode instruments to list devices (flutter#10801)" This reverts commit 37bb5f1. This is to resolve a failure that looks related to a bad install of Xcode 8.0 on our build bots and should be reinstated when the infra issue is diagnosed and resolved. Instruments worked well when this was originally landed, and on the following commit, but started failing two commits after this originally landed. Manual invocation of instruments on the build host currently results in: ``` dyld: Library not loaded: @rpath/InstrumentsAnalysisCore.framework/Versions/A/InstrumentsAnalysisCore Referenced from: /Applications/Xcode8.0.app/Contents/Developer/usr/bin/instruments Reason: image not found Abort trap: 6 ``` It appears the /Applications/Xcode8.0.app/Contents/Applications directory (which contains Instruments) is missing on the host.
This reverts commit b2909a2. This resubmits the following patches: 1. Use Xcode instruments to list devices (flutter#10801) Eliminates the dependency on idevice_id from libimobiledevice. Instead, uses Xcode built-in functionality. 2. Make device discovery asynchronous (flutter#10803) Migrates DeviceDiscovery.devices and all device-specific lookup to be asynchronous.
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.