Skip to content

Warning if pods are not installed and for old CocoaPods versions #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/common
Submodule common updated 3 files
+5 −3 declarations.d.ts
+2 −0 sysinfo.ts
+1 −1 yok.ts
18 changes: 17 additions & 1 deletion lib/services/doctor-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"use strict";
import {EOL} from "os";
import * as helpers from "../common/helpers";
import * as semver from "semver";

class DoctorService implements IDoctorService {
private static MIN_SUPPORTED_GRADLE_VERSION = "2.3";
private static MIN_SUPPORTED_POD_VERSION = "0.38.2";

constructor(private $androidToolsInfo: IAndroidToolsInfo,
private $hostInfo: IHostInfo,
Expand Down Expand Up @@ -67,7 +69,7 @@ class DoctorService implements IDoctorService {
if(sysInfo.gradleVer && helpers.versionCompare(sysInfo.gradleVer, DoctorService.MIN_SUPPORTED_GRADLE_VERSION) === -1) {
this.$logger.warn(`WARNING: Gradle version is lower than ${DoctorService.MIN_SUPPORTED_GRADLE_VERSION}.`);
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
+ `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.`);
+ `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.`);
result = true;
}

Expand All @@ -79,6 +81,20 @@ class DoctorService implements IDoctorService {
result = true;
}

if(!sysInfo.cocoapodVer) {
this.$logger.warn("WARNING: CocoaPod is not installed or is not configured properly.");
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
+ "To be able to build such projects, verify that you have installed CocoaPod.");
result = true;
}

if(sysInfo.cocoapodVer && semver.lt(sysInfo.cocoapodVer, DoctorService.MIN_SUPPORTED_POD_VERSION)) {
this.$logger.warn(`WARNING: CocoaPod version is lower than ${DoctorService.MIN_SUPPORTED_POD_VERSION}`);
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
+ `To be able to build such projects, verify that you have at least ${DoctorService.MIN_SUPPORTED_POD_VERSION} version installed.`);
result = true;
}

let androidToolsIssues = this.$androidToolsInfo.validateInfo().wait();
return result || androidToolsIssues;
}
Expand Down