Skip to content

Commit a7e75e0

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Warning if pods are not installed and for old CocoaPods versions
#949
1 parent 9e67966 commit a7e75e0

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

lib/common

lib/services/doctor-service.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"use strict";
33
import {EOL} from "os";
44
import * as helpers from "../common/helpers";
5+
import * as semver from "semver";
56

67
class DoctorService implements IDoctorService {
78
private static MIN_SUPPORTED_GRADLE_VERSION = "2.3";
9+
private static MIN_SUPPORTED_POD_VERSION = "0.38.2";
810

911
constructor(private $androidToolsInfo: IAndroidToolsInfo,
1012
private $hostInfo: IHostInfo,
@@ -67,7 +69,7 @@ class DoctorService implements IDoctorService {
6769
if(sysInfo.gradleVer && helpers.versionCompare(sysInfo.gradleVer, DoctorService.MIN_SUPPORTED_GRADLE_VERSION) === -1) {
6870
this.$logger.warn(`WARNING: Gradle version is lower than ${DoctorService.MIN_SUPPORTED_GRADLE_VERSION}.`);
6971
this.$logger.out("You will not be able to build your projects for Android or run them in the emulator or on a connected device." + EOL
70-
+ `To be able to build for Android and run apps in the emulator or on a connected device, verify thqt you have at least ${DoctorService.MIN_SUPPORTED_GRADLE_VERSION} version installed.`);
72+
+ `To be able to build for Android and run apps in the emulator or on a connected device, verify that you have at least ${DoctorService.MIN_SUPPORTED_GRADLE_VERSION} version installed.`);
7173
result = true;
7274
}
7375

@@ -79,6 +81,20 @@ class DoctorService implements IDoctorService {
7981
result = true;
8082
}
8183

84+
if(!sysInfo.cocoapodVer) {
85+
this.$logger.warn("WARNING: CocoaPod is not installed or is not configured properly.");
86+
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
87+
+ "To be able to build such projects, verify that you have installed CocoaPod.");
88+
result = true;
89+
}
90+
91+
if(sysInfo.cocoapodVer && semver.lt(sysInfo.cocoapodVer, DoctorService.MIN_SUPPORTED_POD_VERSION)) {
92+
this.$logger.warn(`WARNING: CocoaPod version is lower than ${DoctorService.MIN_SUPPORTED_POD_VERSION}`);
93+
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
94+
+ `To be able to build such projects, verify that you have at least ${DoctorService.MIN_SUPPORTED_POD_VERSION} version installed.`);
95+
result = true;
96+
}
97+
8298
let androidToolsIssues = this.$androidToolsInfo.validateInfo().wait();
8399
return result || androidToolsIssues;
84100
}

0 commit comments

Comments
 (0)