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
e93f4a57
Commit
e93f4a57
authored
Mar 27, 2017
by
Jakob Andersen
Committed by
GitHub
Mar 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS: Make flutter doctor unhappy if CocoaPods is missing. (#8979)
parent
d274888b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
ios_workflow.dart
packages/flutter_tools/lib/src/ios/ios_workflow.dart
+1
-0
ios_workflow_test.dart
packages/flutter_tools/test/src/ios/ios_workflow_test.dart
+30
-0
No files found.
packages/flutter_tools/lib/src/ios/ios_workflow.dart
View file @
e93f4a57
...
...
@@ -181,6 +181,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
if
(
cocoaPodsInstalledAndMeetsVersionCheck
)
{
messages
.
add
(
new
ValidationMessage
(
'CocoaPods version
$cocoaPodsVersionText
'
));
}
else
{
brewStatus
=
ValidationType
.
partial
;
if
(!
hasCocoaPods
)
{
messages
.
add
(
new
ValidationMessage
.
error
(
'CocoaPods not installed. To install:
\n
'
...
...
packages/flutter_tools/test/src/ios/ios_workflow_test.dart
View file @
e93f4a57
...
...
@@ -119,6 +119,30 @@ void main() {
expect
(
result
.
type
,
ValidationType
.
partial
);
},
overrides:
<
Type
,
Generator
>{
Xcode:
()
=>
xcode
});
testUsingContext
(
'Emits partial status when CocoaPods is not installed'
,
()
async
{
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
when
(
xcode
.
xcodeVersionText
)
.
thenReturn
(
'Xcode 8.2.1
\n
Build version 8C1002
\n
'
);
when
(
xcode
.
isInstalledAndMeetsVersionCheck
).
thenReturn
(
true
);
when
(
xcode
.
eulaSigned
).
thenReturn
(
true
);
final
IOSWorkflowTestTarget
workflow
=
new
IOSWorkflowTestTarget
()
..
hasCocoaPods
=
false
;
final
ValidationResult
result
=
await
workflow
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
},
overrides:
<
Type
,
Generator
>{
Xcode:
()
=>
xcode
});
testUsingContext
(
'Emits partial status when CocoaPods version is too low'
,
()
async
{
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
when
(
xcode
.
xcodeVersionText
)
.
thenReturn
(
'Xcode 8.2.1
\n
Build version 8C1002
\n
'
);
when
(
xcode
.
isInstalledAndMeetsVersionCheck
).
thenReturn
(
true
);
when
(
xcode
.
eulaSigned
).
thenReturn
(
true
);
final
IOSWorkflowTestTarget
workflow
=
new
IOSWorkflowTestTarget
()
..
cocoaPodsVersionText
=
'0.39.0'
;
final
ValidationResult
result
=
await
workflow
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
},
overrides:
<
Type
,
Generator
>{
Xcode:
()
=>
xcode
});
testUsingContext
(
'Succeeds when all checks pass'
,
()
async
{
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
when
(
xcode
.
xcodeVersionText
)
...
...
@@ -165,4 +189,10 @@ class IOSWorkflowTestTarget extends IOSWorkflow {
@override
bool
get
hasIDeviceInstaller
=>
true
;
@override
bool
hasCocoaPods
=
true
;
@override
String
cocoaPodsVersionText
=
'1.2.0'
;
}
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