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
f8772661
Unverified
Commit
f8772661
authored
Oct 22, 2020
by
Jenn Magder
Committed by
GitHub
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CocoaPods sudo installation note (#68542)
* Add CocoaPods sudo installation note * Refer to instructions
parent
6cab3f60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
26 deletions
+13
-26
user_messages.dart
packages/flutter_tools/lib/src/base/user_messages.dart
+4
-8
cocoapods.dart
packages/flutter_tools/lib/src/macos/cocoapods.dart
+7
-16
cocoapods_validator.dart
...ages/flutter_tools/lib/src/macos/cocoapods_validator.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/base/user_messages.dart
View file @
f8772661
...
@@ -165,23 +165,19 @@ class UserMessages {
...
@@ -165,23 +165,19 @@ class UserMessages {
String
cocoaPodsMissing
(
String
consequence
,
String
installInstructions
)
=>
String
cocoaPodsMissing
(
String
consequence
,
String
installInstructions
)
=>
'CocoaPods not installed.
\n
'
'CocoaPods not installed.
\n
'
'
$consequence
\n
'
'
$consequence
\n
'
'To install:
\n
'
'To install
$installInstructions
'
;
'
$installInstructions
'
;
String
cocoaPodsUnknownVersion
(
String
consequence
,
String
upgradeInstructions
)
=>
String
cocoaPodsUnknownVersion
(
String
consequence
,
String
upgradeInstructions
)
=>
'Unknown CocoaPods version installed.
\n
'
'Unknown CocoaPods version installed.
\n
'
'
$consequence
\n
'
'
$consequence
\n
'
'To upgrade:
\n
'
'To upgrade
$upgradeInstructions
'
;
'
$upgradeInstructions
'
;
String
cocoaPodsOutdated
(
String
currentVersion
,
String
recVersion
,
String
consequence
,
String
upgradeInstructions
)
=>
String
cocoaPodsOutdated
(
String
currentVersion
,
String
recVersion
,
String
consequence
,
String
upgradeInstructions
)
=>
'CocoaPods
$currentVersion
out of date (
$recVersion
is recommended).
\n
'
'CocoaPods
$currentVersion
out of date (
$recVersion
is recommended).
\n
'
'
$consequence
\n
'
'
$consequence
\n
'
'To upgrade:
\n
'
'To upgrade
$upgradeInstructions
'
;
'
$upgradeInstructions
'
;
String
cocoaPodsBrokenInstall
(
String
consequence
,
String
reinstallInstructions
)
=>
String
cocoaPodsBrokenInstall
(
String
consequence
,
String
reinstallInstructions
)
=>
'CocoaPods installed but not working.
\n
'
'CocoaPods installed but not working.
\n
'
'
$consequence
\n
'
'
$consequence
\n
'
'To re-install CocoaPods, run:
\n
'
'To re-install
$reinstallInstructions
'
;
'
$reinstallInstructions
'
;
// Messages used in VsCodeValidator
// Messages used in VsCodeValidator
String
vsCodeVersion
(
String
version
)
=>
'version
$version
'
;
String
vsCodeVersion
(
String
version
)
=>
'version
$version
'
;
...
...
packages/flutter_tools/lib/src/macos/cocoapods.dart
View file @
f8772661
...
@@ -30,7 +30,7 @@ const String unknownCocoaPodsConsequence = '''
...
@@ -30,7 +30,7 @@ const String unknownCocoaPodsConsequence = '''
const String brokenCocoaPodsConsequence = '''
const String brokenCocoaPodsConsequence = '''
You
appear
to
have
CocoaPods
installed
but
it
is
not
working
.
You
appear
to
have
CocoaPods
installed
but
it
is
not
working
.
This
can
happen
if
the
version
of
Ruby
that
CocoaPods
was
installed
with
is
different
from
the
one
being
used
to
invoke
it
.
This
can
happen
if
the
version
of
Ruby
that
CocoaPods
was
installed
with
is
different
from
the
one
being
used
to
invoke
it
.
This
can
usually
be
fixed
by
re
-
installing
CocoaPods
.
For
more
info
,
see
https:
//github.com/flutter/flutter/issues/14293.
''';
This
can
usually
be
fixed
by
re
-
installing
CocoaPods
.
''';
const String outOfDateFrameworksPodfileConsequence = '''
const String outOfDateFrameworksPodfileConsequence = '''
This
can
cause
a
mismatched
version
of
Flutter
to
be
embedded
in
your
app
,
which
may
result
in
App
Store
submission
rejection
or
crashes
.
This
can
cause
a
mismatched
version
of
Flutter
to
be
embedded
in
your
app
,
which
may
result
in
App
Store
submission
rejection
or
crashes
.
...
@@ -41,11 +41,7 @@ const String outOfDatePluginsPodfileConsequence = '''
...
@@ -41,11 +41,7 @@ const String outOfDatePluginsPodfileConsequence = '''
See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.'''
;
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.'''
;
const
String
cocoaPodsInstallInstructions
=
'''
const
String
cocoaPodsInstallInstructions
=
'see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.'
;
sudo gem install cocoapods'''
;
const
String
cocoaPodsUpgradeInstructions
=
'''
sudo gem install cocoapods'''
;
const
String
podfileMigrationInstructions
=
'''
const
String
podfileMigrationInstructions
=
'''
rm ios/Podfile'''
;
rm ios/Podfile'''
;
...
@@ -195,8 +191,7 @@ class CocoaPods {
...
@@ -195,8 +191,7 @@ class CocoaPods {
_logger
.
printError
(
_logger
.
printError
(
'Warning: CocoaPods not installed. Skipping pod install.
\n
'
'Warning: CocoaPods not installed. Skipping pod install.
\n
'
'
$noCocoaPodsConsequence
\n
'
'
$noCocoaPodsConsequence
\n
'
'To install:
\n
'
'To install
$cocoaPodsInstallInstructions
\n
'
,
'
$cocoaPodsInstallInstructions
\n
'
,
emphasis:
true
,
emphasis:
true
,
);
);
return
false
;
return
false
;
...
@@ -204,8 +199,7 @@ class CocoaPods {
...
@@ -204,8 +199,7 @@ class CocoaPods {
_logger
.
printError
(
_logger
.
printError
(
'Warning: CocoaPods is installed but broken. Skipping pod install.
\n
'
'Warning: CocoaPods is installed but broken. Skipping pod install.
\n
'
'
$brokenCocoaPodsConsequence
\n
'
'
$brokenCocoaPodsConsequence
\n
'
'To re-install:
\n
'
'To re-install
$cocoaPodsInstallInstructions
\n
'
,
'
$cocoaPodsUpgradeInstructions
\n
'
,
emphasis:
true
,
emphasis:
true
,
);
);
return
false
;
return
false
;
...
@@ -213,8 +207,7 @@ class CocoaPods {
...
@@ -213,8 +207,7 @@ class CocoaPods {
_logger
.
printError
(
_logger
.
printError
(
'Warning: Unknown CocoaPods version installed.
\n
'
'Warning: Unknown CocoaPods version installed.
\n
'
'
$unknownCocoaPodsConsequence
\n
'
'
$unknownCocoaPodsConsequence
\n
'
'To upgrade:
\n
'
'To upgrade
$cocoaPodsInstallInstructions
\n
'
,
'
$cocoaPodsUpgradeInstructions
\n
'
,
emphasis:
true
,
emphasis:
true
,
);
);
break
;
break
;
...
@@ -222,8 +215,7 @@ class CocoaPods {
...
@@ -222,8 +215,7 @@ class CocoaPods {
_logger
.
printError
(
_logger
.
printError
(
'Warning: CocoaPods minimum required version
$cocoaPodsMinimumVersion
or greater not installed. Skipping pod install.
\n
'
'Warning: CocoaPods minimum required version
$cocoaPodsMinimumVersion
or greater not installed. Skipping pod install.
\n
'
'
$noCocoaPodsConsequence
\n
'
'
$noCocoaPodsConsequence
\n
'
'To upgrade:
\n
'
'To upgrade
$cocoaPodsInstallInstructions
\n
'
,
'
$cocoaPodsUpgradeInstructions
\n
'
,
emphasis:
true
,
emphasis:
true
,
);
);
return
false
;
return
false
;
...
@@ -231,8 +223,7 @@ class CocoaPods {
...
@@ -231,8 +223,7 @@ class CocoaPods {
_logger
.
printError
(
_logger
.
printError
(
'Warning: CocoaPods recommended version
$cocoaPodsRecommendedVersion
or greater not installed.
\n
'
'Warning: CocoaPods recommended version
$cocoaPodsRecommendedVersion
or greater not installed.
\n
'
'Pods handling may fail on some projects involving plugins.
\n
'
'Pods handling may fail on some projects involving plugins.
\n
'
'To upgrade:
\n
'
'To upgrade
$cocoaPodsInstallInstructions
\n
'
,
'
$cocoaPodsUpgradeInstructions
\n
'
,
emphasis:
true
,
emphasis:
true
,
);
);
break
;
break
;
...
...
packages/flutter_tools/lib/src/macos/cocoapods_validator.dart
View file @
f8772661
...
@@ -50,12 +50,12 @@ class CocoaPodsValidator extends DoctorValidator {
...
@@ -50,12 +50,12 @@ class CocoaPodsValidator extends DoctorValidator {
}
else
if
(
cocoaPodsStatus
==
CocoaPodsStatus
.
unknownVersion
)
{
}
else
if
(
cocoaPodsStatus
==
CocoaPodsStatus
.
unknownVersion
)
{
status
=
ValidationType
.
partial
;
status
=
ValidationType
.
partial
;
messages
.
add
(
ValidationMessage
.
hint
(
messages
.
add
(
ValidationMessage
.
hint
(
_userMessages
.
cocoaPodsUnknownVersion
(
unknownCocoaPodsConsequence
,
cocoaPods
Upgrade
Instructions
)));
_userMessages
.
cocoaPodsUnknownVersion
(
unknownCocoaPodsConsequence
,
cocoaPods
Install
Instructions
)));
}
else
{
}
else
{
status
=
ValidationType
.
partial
;
status
=
ValidationType
.
partial
;
final
String
currentVersionText
=
await
_cocoaPods
.
cocoaPodsVersionText
;
final
String
currentVersionText
=
await
_cocoaPods
.
cocoaPodsVersionText
;
messages
.
add
(
ValidationMessage
.
hint
(
messages
.
add
(
ValidationMessage
.
hint
(
_userMessages
.
cocoaPodsOutdated
(
currentVersionText
,
_cocoaPods
.
cocoaPodsRecommendedVersion
,
noCocoaPodsConsequence
,
cocoaPods
Upgrade
Instructions
)));
_userMessages
.
cocoaPodsOutdated
(
currentVersionText
,
_cocoaPods
.
cocoaPodsRecommendedVersion
,
noCocoaPodsConsequence
,
cocoaPods
Install
Instructions
)));
}
}
}
}
...
...
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