@@ -50,10 +50,23 @@ Library that helps identifying if the environment can be used for development of
5050 * Describes warning returned from nativescript-doctor check.
5151 */
5252interface IWarning {
53- /** The warning. */
53+ /**
54+ * The warning.
55+ * @type {string}
56+ */
5457warning: string;
55- /** Additional information for the warning. */
58+
59+ /**
60+ * Additional information for the warning.
61+ * @type {string}
62+ */
5663additionalInformation: string;
64+
65+ /**
66+ * The platforms which are affected by this warning.
67+ * @type {string[]}
68+ */
69+ platforms: string[];
5770}
5871```
5972
@@ -108,14 +121,23 @@ Library that helps identifying if the environment can be used for development of
108121const isCocoaPodsWorkingCorrectly = await sysInfo.isCocoaPodsWorkingCorrectly();
109122console.log("is cocoapods working correctly: ", isCocoaPodsWorkingCorrectly);
110123
124+ const nativeScriptCliVersion = await sysInfo.getNativeScriptCliVersion();
125+ console.log("{N} CLI version: ", nativeScriptCliVersion);
126+
127+ const xcprojInfo = await sysInfo.getXcprojInfo();
128+ console.log("xcproj info: ", xcprojInfo);
129+
130+ const isCocoaPodsUpdateRequired = await sysInfo.isCocoaPodsUpdateRequired();
131+ console.log("is CocoaPods update required: ", isCocoaPodsUpdateRequired);
132+
111133const sysInfoData = await sysInfo.getSysInfo();
112134console.log("sysInfo: ", sysInfoData);
113135}
114136
115137main();
116138
117139```
118-
140+
119141- Interfaces:
120142```TypeScript
121143/**
@@ -138,7 +160,7 @@ Library that helps identifying if the environment can be used for development of
138160 * Returns the currently installed version of Xcode.
139161 * @return {Promise<string>} Returns the currently installed version of Xcode or null if Xcode is not installed or executed on Linux or Windows.
140162 */
141- getXCodeVersion (): Promise<string>;
163+ getXcodeVersion (): Promise<string>;
142164
143165/**
144166 * Returns the currently installed Node.js version.
@@ -156,7 +178,7 @@ Library that helps identifying if the environment can be used for development of
156178 * Returns the xcodeproj gem location.
157179 * @return {Promise<string>} Returns the xcodeproj gem location. If the the xcodeproj gem is not installed it will return null.
158180 */
159- getXCodeProjGemLocation (): Promise<string>;
181+ getXcodeprojGemLocation (): Promise<string>;
160182
161183/**
162184 * Checks if iTunes is installed.
@@ -212,6 +234,24 @@ Library that helps identifying if the environment can be used for development of
212234 */
213235isCocoaPodsWorkingCorrectly(): Promise<boolean>;
214236
237+ /**
238+ * Returns the version of the globally installed NativeScript CLI.
239+ * @return {Promise<string>} Returns the version of the globally installed NativeScript CLI.
240+ */
241+ getNativeScriptCliVersion(): Promise<string>;
242+
243+ /**
244+ * Checks if xcproj is required to build projects and if it is installed.
245+ * @return {Promise<IXcprojInfo>} Returns the collected information aboud xcproj.
246+ */
247+ getXcprojInfo(): Promise<IXcprojInfo>;
248+
249+ /**
250+ * Checks if the current version of CocoaPods is compatible with the installed Xcode.
251+ * @return {boolean} true if an update us require.
252+ */
253+ isCocoaPodsUpdateRequired(): Promise<boolean>;
254+
215255/**
216256 * Returns the whole system information.
217257 * @return {Promise<ISysInfoData>} The system information.
@@ -342,5 +382,63 @@ Library that helps identifying if the environment can be used for development of
342382 * @type {boolean}
343383 */
344384isCocoaPodsWorkingCorrectly: boolean;
385+
386+ /**
387+ * NativeScript CLI version string, as returned by `tns --version`.
388+ * @type {string}
389+ */
390+ nativeScriptCliVersion: string;
391+
392+ /**
393+ * Information about xcproj.
394+ * @type {string}
395+ */
396+ xcprojInfo: IXcprojInfo
397+
398+ /**
399+ * true if the system requires xcproj to build projects successfully and the CocoaPods version is not compatible with the Xcode.
400+ */
401+ isCocoaPodsUpdateRequired: boolean;
402+ }
403+
404+ /**
405+ * Describes information about xcproj brew formula.
406+ */
407+ interface IXcprojInfo {
408+ /**
409+ * Determines whether the system needs xcproj to execute ios builds sucessfully.
410+ */
411+ shouldUseXcproj: boolean;
412+
413+ /**
414+ * Determines whether xcproj can be called from the command line.
415+ */
416+ xcprojAvailable: boolean;
417+ }
418+ ```
419+
420+ * Module ` constants ` :
421+ - Usage:
422+ ```TypeScript
423+ import { constants } from "nativescript-doctor"
424+
425+ function main() {
426+ for(let constantName in constants) {
427+ console.log(`${constantName}: ${constants[constantName]}`);
428+ }
429+ }
430+
431+ main();
432+ ```
433+
434+ - Interfaces:
435+ ```TypeScript
436+ /**
437+ * Describes the constants used in the module.
438+ */
439+ interface IConstants {
440+ ANDROID_PLATFORM_NAME: string;
441+ IOS_PLATFORM_NAME: string;
442+ SUPPORTED_PLATFORMS: string[];
345443}
346444```
0 commit comments