Skip to content

Conversation

@cbracken
Copy link
Member

Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.

Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.
@cbracken
Copy link
Member Author

cbracken commented Jun 16, 2017

Related #10602, #10633

This should fix the missing device name, OS version seen in #10633.

//
// my-mac-pro [2C10513E-4dA5-405C-8EF5-C44353DB3ADD]
// My iPhone (10.3.2) [75b90e947c5f429fa67f3e9169fda0d89f0492f1]
// iPhone 6s (9.3) [F6CEE7CF-81EB-4448-81B4-1755288C7C11] (Simulator)
Copy link
Contributor

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)"

Copy link
Member Author

@cbracken cbracken Jun 16, 2017

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'(.*) +\((.*)\) +\[(.*)]$');
Copy link
Contributor

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 :-)

Copy link
Member Author

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() {
Copy link
Contributor

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>?

Copy link
Member Author

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.

@cbracken cbracken merged commit 37bb5f1 into flutter:master Jun 16, 2017
@cbracken cbracken deleted the devices-instruments-good branch June 16, 2017 23:02
cbracken added a commit to cbracken/flutter that referenced this pull request Jun 17, 2017
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.
cbracken added a commit that referenced this pull request Jun 17, 2017
* 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.
cbracken added a commit to cbracken/flutter that referenced this pull request Jun 19, 2017
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.
cbracken added a commit that referenced this pull request Jun 19, 2017
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.
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
* 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.
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
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.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants