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
f5b02e3c
Unverified
Commit
f5b02e3c
authored
Nov 20, 2018
by
Jonah Williams
Committed by
GitHub
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump minimum ios_deploy version (#24550)
parent
19b97ae5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
ios_workflow.dart
packages/flutter_tools/lib/src/ios/ios_workflow.dart
+1
-1
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+6
-0
ios_workflow_test.dart
packages/flutter_tools/test/ios/ios_workflow_test.dart
+38
-1
No files found.
packages/flutter_tools/lib/src/ios/ios_workflow.dart
View file @
f5b02e3c
...
...
@@ -49,7 +49,7 @@ class IOSValidator extends DoctorValidator {
Future
<
bool
>
get
hasIosDeploy
=>
exitsHappyAsync
(<
String
>[
'ios-deploy'
,
'--version'
]);
String
get
iosDeployMinimumVersion
=>
'1.9.
2
'
;
String
get
iosDeployMinimumVersion
=>
'1.9.
4
'
;
Future
<
String
>
get
iosDeployVersionText
async
=>
(
await
runAsync
(<
String
>[
'ios-deploy'
,
'--version'
])).
processResult
.
stdout
.
replaceAll
(
'
\n
'
,
''
);
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
f5b02e3c
...
...
@@ -105,6 +105,12 @@ class IMobileDevice {
Future
<
bool
>
get
isWorking
async
{
if
(!
isInstalled
)
return
false
;
// If usage info is printed in a hyphenated id, we need to update.
const
String
fakeIphoneId
=
'00008020-001C2D903C42002E'
;
final
ProcessResult
ideviceResult
=
(
await
runAsync
(<
String
>[
'ideviceinfo'
,
'-u'
,
fakeIphoneId
])).
processResult
;
if
(
ideviceResult
.
stdout
.
contains
(
'Usage: ideviceinfo'
))
{
return
false
;
}
// If no device is attached, we're unable to detect any problems. Assume all is well.
final
ProcessResult
result
=
(
await
runAsync
(<
String
>[
'idevice_id'
,
'-l'
])).
processResult
;
...
...
packages/flutter_tools/test/ios/ios_workflow_test.dart
View file @
f5b02e3c
...
...
@@ -162,6 +162,42 @@ void main() {
CocoaPods:
()
=>
cocoaPods
,
});
testUsingContext
(
'Emits partial status when libimobiledevice is installed but not working'
,
()
async
{
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
when
(
xcode
.
versionText
)
.
thenReturn
(
'Xcode 8.2.1
\n
Build version 8C1002
\n
'
);
when
(
xcode
.
isInstalledAndMeetsVersionCheck
).
thenReturn
(
true
);
when
(
xcode
.
eulaSigned
).
thenReturn
(
true
);
when
(
xcode
.
isSimctlInstalled
).
thenReturn
(
true
);
when
(
processManager
.
run
(
<
String
>[
'ideviceinfo'
,
'-u'
,
'00008020-001C2D903C42002E'
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
)),
).
thenAnswer
((
Invocation
_
)
async
{
final
MockProcessResult
result
=
MockProcessResult
();
when
<
String
>(
result
.
stdout
).
thenReturn
(
r''
'
Usage: ideviceinfo [OPTIONS]
Show information about a connected device.
-d, --debug enable communication debugging
-s, --simple use a simple connection to avoid auto-pairing with the device
-u, --udid UDID target specific device by its 40-digit device UDID
-q, --domain NAME set domain of query to NAME. Default: None
-k, --key NAME only query key specified by NAME. Default: All keys.
-x, --xml output information as xml plist instead of key/value pairs
-h, --help prints usage information
'''
);
});
final
IOSWorkflowTestTarget
workflow
=
IOSWorkflowTestTarget
();
final
ValidationResult
result
=
await
workflow
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
processManager
,
Xcode:
()
=>
xcode
,
CocoaPods:
()
=>
cocoaPods
,
});
testUsingContext
(
'Emits partial status when ios-deploy is not installed'
,
()
async
{
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
when
(
xcode
.
versionText
)
...
...
@@ -313,12 +349,13 @@ class MockIMobileDevice extends IMobileDevice {
class
MockXcode
extends
Mock
implements
Xcode
{}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockCocoaPods
extends
Mock
implements
CocoaPods
{}
class
MockProcessResult
extends
Mock
implements
ProcessResult
{}
class
IOSWorkflowTestTarget
extends
IOSValidator
{
IOSWorkflowTestTarget
({
this
.
hasHomebrew
=
true
,
bool
hasIosDeploy
=
true
,
String
iosDeployVersionText
=
'1.9.
2
'
,
String
iosDeployVersionText
=
'1.9.
4
'
,
bool
hasIDeviceInstaller
=
true
,
})
:
hasIosDeploy
=
Future
<
bool
>.
value
(
hasIosDeploy
),
iosDeployVersionText
=
Future
<
String
>.
value
(
iosDeployVersionText
),
...
...
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