Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ca32668b
Unverified
Commit
ca32668b
authored
Jun 23, 2020
by
Christopher Fujino
Committed by
GitHub
Jun 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
port devicelab from idevice_id -> xcdevices (#59907)
parent
8b79bb97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
22 deletions
+41
-22
codesign.dart
dev/bots/codesign.dart
+0
-1
adb.dart
dev/devicelab/lib/framework/adb.dart
+40
-20
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+1
-1
No files found.
dev/bots/codesign.dart
View file @
ca32668b
...
...
@@ -62,7 +62,6 @@ bool checkCacheIsCurrent() {
}
List
<
String
>
get
binariesWithEntitlements
=>
List
<
String
>.
unmodifiable
(<
String
>[
'idevice_id'
,
'ideviceinfo'
,
'idevicename'
,
'idevicescreenshot'
,
...
...
dev/devicelab/lib/framework/adb.dart
View file @
ca32668b
...
...
@@ -551,29 +551,49 @@ class IosDeviceDiscovery implements DeviceDiscovery {
print
(
'Device chosen:
$_workingDevice
'
);
}
// Returns a colon-separated environment variable that contains the paths
// of linked libraries for idevice_id
Map
<
String
,
String
>
get
_ideviceIdEnvironment
{
final
String
libPath
=
const
<
String
>[
'libimobiledevice'
,
'usbmuxd'
,
'libplist'
,
'openssl'
,
'ios-deploy'
,
].
map
((
String
packageName
)
=>
path
.
join
(
getArtifactPath
(),
packageName
)).
join
(
':'
);
return
<
String
,
String
>{
'DYLD_LIBRARY_PATH'
:
libPath
};
}
@override
Future
<
List
<
String
>>
discoverDevices
()
async
{
final
String
ideviceIdPath
=
path
.
join
(
getArtifactPath
(),
'libimobiledevice'
,
'idevice_id'
);
final
List
<
String
>
iosDeviceIDs
=
LineSplitter
.
split
(
await
eval
(
ideviceIdPath
,
<
String
>[
'-l'
],
environment:
_ideviceIdEnvironment
))
.
map
<
String
>((
String
line
)
=>
line
.
trim
())
.
where
((
String
line
)
=>
line
.
isNotEmpty
)
.
toList
();
if
(
iosDeviceIDs
.
isEmpty
)
final
List
<
dynamic
>
results
=
json
.
decode
(
await
eval
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
<
String
>[
'devices'
,
'--machine'
,
'--suppress-analytics'
],
))
as
List
<
dynamic
>;
// [
// {
// "name": "Flutter's iPhone",
// "id": "00008020-00017DA80CC1002E",
// "isSupported": true,
// "targetPlatform": "ios",
// "emulator": false,
// "sdk": "iOS 13.2",
// "capabilities": {
// "hotReload": true,
// "hotRestart": true,
// "screenshot": true,
// "fastStart": false,
// "flutterExit": true,
// "hardwareRendering": false,
// "startPaused": false
// }
// }
// ]
final
List
<
String
>
deviceIds
=
<
String
>[];
for
(
final
dynamic
result
in
results
)
{
final
Map
<
String
,
dynamic
>
device
=
result
as
Map
<
String
,
dynamic
>;
if
(
device
[
'targetPlatform'
]
==
'ios'
&&
device
[
'id'
]
!=
null
&&
device
[
'emulator'
]
!=
true
&&
device
[
'isSupported'
]
==
true
)
{
deviceIds
.
add
(
device
[
'id'
]
as
String
);
}
}
if
(
deviceIds
.
isEmpty
)
{
throw
const
DeviceException
(
'No connected iOS devices found.'
);
return
iosDeviceIDs
;
}
return
deviceIds
;
}
@override
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
ca32668b
...
...
@@ -819,7 +819,7 @@ abstract class FlutterCommand extends Command<void> {
// sky_engine package is available in the flutter cache for pub to find.
if
(
shouldUpdateCache
)
{
// First always update universal artifacts, as some of these (e.g.
// i
device_id
on macOS) are required to determine `requiredArtifacts`.
// i
os-deploy
on macOS) are required to determine `requiredArtifacts`.
await
globals
.
cache
.
updateAll
(<
DevelopmentArtifact
>{
DevelopmentArtifact
.
universal
});
await
globals
.
cache
.
updateAll
(
await
requiredArtifacts
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment