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
9bd2e400
Unverified
Commit
9bd2e400
authored
Jul 19, 2019
by
Christopher Fujino
Committed by
GitHub
Jul 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Throw exception if instantiating IOSDevice on non-mac os platform (#36288)
parent
a52f0f77
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
85 deletions
+133
-85
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+5
-4
devices_test.dart
...es/flutter_tools/test/general.shard/ios/devices_test.dart
+128
-81
No files found.
packages/flutter_tools/lib/src/ios/devices.dart
View file @
9bd2e400
...
@@ -125,14 +125,12 @@ class IOSDevice extends Device {
...
@@ -125,14 +125,12 @@ class IOSDevice extends Device {
ephemeral:
true
,
ephemeral:
true
,
)
{
)
{
if
(!
platform
.
isMacOS
)
{
if
(!
platform
.
isMacOS
)
{
printError
(
'Cannot control iOS devices or simulators. ideviceinstaller and iproxy are not available on your platform.'
);
assert
(
false
,
'Control of iOS devices or simulators only supported on Mac OS.'
);
_installerPath
=
null
;
_iproxyPath
=
null
;
return
;
return
;
}
}
_installerPath
=
artifacts
.
getArtifactPath
(
_installerPath
=
artifacts
.
getArtifactPath
(
Artifact
.
ideviceinstaller
,
Artifact
.
ideviceinstaller
,
platform:
TargetPlatform
.
ios
platform:
TargetPlatform
.
ios
,
)
??
'ideviceinstaller'
;
// TODO(fujino): remove fallback once g3 updated
)
??
'ideviceinstaller'
;
// TODO(fujino): remove fallback once g3 updated
_iproxyPath
=
artifacts
.
getArtifactPath
(
_iproxyPath
=
artifacts
.
getArtifactPath
(
Artifact
.
iproxy
,
Artifact
.
iproxy
,
...
@@ -168,6 +166,9 @@ class IOSDevice extends Device {
...
@@ -168,6 +166,9 @@ class IOSDevice extends Device {
bool
get
supportsStartPaused
=>
false
;
bool
get
supportsStartPaused
=>
false
;
static
Future
<
List
<
IOSDevice
>>
getAttachedDevices
()
async
{
static
Future
<
List
<
IOSDevice
>>
getAttachedDevices
()
async
{
if
(!
platform
.
isMacOS
)
{
throw
UnsupportedError
(
'Control of iOS devices or simulators only supported on Mac OS.'
);
}
if
(!
iMobileDevice
.
isInstalled
)
if
(!
iMobileDevice
.
isInstalled
)
return
<
IOSDevice
>[];
return
<
IOSDevice
>[];
...
...
packages/flutter_tools/test/general.shard/ios/devices_test.dart
View file @
9bd2e400
This diff is collapsed.
Click to expand it.
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