@@ -89,11 +89,9 @@ class CocoaPods {
89
89
_processManager = processManager,
90
90
_xcodeProjectInterpreter = xcodeProjectInterpreter,
91
91
_logger = logger,
92
- _platform = platform,
93
92
_artifacts = artifacts,
94
93
_usage = usage,
95
94
_processUtils = ProcessUtils (processManager: processManager, logger: logger),
96
- _fileSystemUtils = FileSystemUtils (fileSystem: fileSystem, platform: platform),
97
95
_operatingSystemUtils = OperatingSystemUtils (
98
96
fileSystem: fileSystem,
99
97
logger: logger,
@@ -103,19 +101,17 @@ class CocoaPods {
103
101
104
102
final FileSystem _fileSystem;
105
103
final ProcessManager _processManager;
106
- final FileSystemUtils _fileSystemUtils;
107
104
final ProcessUtils _processUtils;
108
105
final OperatingSystemUtils _operatingSystemUtils;
109
106
final XcodeProjectInterpreter _xcodeProjectInterpreter;
110
107
final Logger _logger;
111
- final Platform _platform;
112
108
final Artifacts _artifacts;
113
109
final Usage _usage;
114
110
115
111
Future <String > _versionText;
116
112
117
- String get cocoaPodsMinimumVersion => '1.6 .0' ;
118
- String get cocoaPodsRecommendedVersion => '1.9 .0' ;
113
+ String get cocoaPodsMinimumVersion => '1.9 .0' ;
114
+ String get cocoaPodsRecommendedVersion => '1.10 .0' ;
119
115
120
116
Future <bool > get isInstalled =>
121
117
_processUtils.exitsHappy (< String > ['which' , 'pod' ]);
@@ -157,28 +153,6 @@ class CocoaPods {
157
153
}
158
154
}
159
155
160
- /// Whether CocoaPods ran 'pod setup' once where the costly pods' specs are
161
- /// cloned.
162
- ///
163
- /// Versions >= 1.8.0 do not require 'pod setup' and default to a CDN instead
164
- /// of a locally cloned repository.
165
- /// See http://blog.cocoapods.org/CocoaPods-1.8.0-beta/
166
- ///
167
- /// A user can override the default location via the CP_REPOS_DIR environment
168
- /// variable.
169
- ///
170
- /// See https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/config.rb#L138
171
- /// for details of this variable.
172
- Future <bool > get isCocoaPodsInitialized async {
173
- final Version installedVersion = Version .parse (await cocoaPodsVersionText);
174
- if (installedVersion != null && installedVersion >= Version .parse ('1.8.0' )) {
175
- return true ;
176
- }
177
- final String cocoapodsReposDir = _platform.environment['CP_REPOS_DIR' ]
178
- ?? _fileSystem.path.join (_fileSystemUtils.homeDirPath, '.cocoapods' , 'repos' );
179
- return _fileSystem.isDirectory (_fileSystem.path.join (cocoapodsReposDir, 'master' ));
180
- }
181
-
182
156
Future <bool > processPods ({
183
157
@required XcodeBasedProject xcodeProject,
184
158
@required BuildMode buildMode,
@@ -246,17 +220,6 @@ class CocoaPods {
246
220
case CocoaPodsStatus .recommended:
247
221
break ;
248
222
}
249
- if (! await isCocoaPodsInitialized) {
250
- _logger.printError (
251
- 'Warning: CocoaPods installed but not initialized. Skipping pod install.\n '
252
- '$noCocoaPodsConsequence \n '
253
- 'To initialize CocoaPods, run:\n '
254
- ' pod setup\n '
255
- "once to finalize CocoaPods' installation." ,
256
- emphasis: true ,
257
- );
258
- return false ;
259
- }
260
223
261
224
return true ;
262
225
}
0 commit comments