@@ -50,10 +50,23 @@ Library that helps identifying if the environment can be used for development of
50
50
* Describes warning returned from nativescript-doctor check.
51
51
*/
52
52
interface IWarning {
53
- /** The warning. */
53
+ /**
54
+ * The warning.
55
+ * @type {string}
56
+ */
54
57
warning: string;
55
- /** Additional information for the warning. */
58
+
59
+ /**
60
+ * Additional information for the warning.
61
+ * @type {string}
62
+ */
56
63
additionalInformation: string;
64
+
65
+ /**
66
+ * The platforms which are affected by this warning.
67
+ * @type {string[]}
68
+ */
69
+ platforms: string[];
57
70
}
58
71
```
59
72
@@ -108,14 +121,23 @@ Library that helps identifying if the environment can be used for development of
108
121
const isCocoaPodsWorkingCorrectly = await sysInfo.isCocoaPodsWorkingCorrectly();
109
122
console.log("is cocoapods working correctly: ", isCocoaPodsWorkingCorrectly);
110
123
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
+
111
133
const sysInfoData = await sysInfo.getSysInfo();
112
134
console.log("sysInfo: ", sysInfoData);
113
135
}
114
136
115
137
main();
116
138
117
139
```
118
-
140
+
119
141
- Interfaces:
120
142
```TypeScript
121
143
/**
@@ -138,7 +160,7 @@ Library that helps identifying if the environment can be used for development of
138
160
* Returns the currently installed version of Xcode.
139
161
* @return {Promise<string>} Returns the currently installed version of Xcode or null if Xcode is not installed or executed on Linux or Windows.
140
162
*/
141
- getXCodeVersion (): Promise<string>;
163
+ getXcodeVersion (): Promise<string>;
142
164
143
165
/**
144
166
* Returns the currently installed Node.js version.
@@ -156,7 +178,7 @@ Library that helps identifying if the environment can be used for development of
156
178
* Returns the xcodeproj gem location.
157
179
* @return {Promise<string>} Returns the xcodeproj gem location. If the the xcodeproj gem is not installed it will return null.
158
180
*/
159
- getXCodeProjGemLocation (): Promise<string>;
181
+ getXcodeprojGemLocation (): Promise<string>;
160
182
161
183
/**
162
184
* Checks if iTunes is installed.
@@ -212,6 +234,24 @@ Library that helps identifying if the environment can be used for development of
212
234
*/
213
235
isCocoaPodsWorkingCorrectly(): Promise<boolean>;
214
236
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
+
215
255
/**
216
256
* Returns the whole system information.
217
257
* @return {Promise<ISysInfoData>} The system information.
@@ -342,5 +382,63 @@ Library that helps identifying if the environment can be used for development of
342
382
* @type {boolean}
343
383
*/
344
384
isCocoaPodsWorkingCorrectly: 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[];
345
443
}
346
444
```
0 commit comments