@@ -50,10 +50,20 @@ 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
+ /** The warning.
54
+ * @type {string}
55
+ */
54
56
warning: string;
55
- /** Additional information for the warning. */
57
+
58
+ /** Additional information for the warning.
59
+ * @type {string}
60
+ */
56
61
additionalInformation: string;
62
+
63
+ /** The platforms which are affected by this warning.
64
+ * @type {string[]}
65
+ */
66
+ platforms: string[];
57
67
}
58
68
```
59
69
@@ -108,14 +118,23 @@ Library that helps identifying if the environment can be used for development of
108
118
const isCocoaPodsWorkingCorrectly = await sysInfo.isCocoaPodsWorkingCorrectly();
109
119
console.log("is cocoapods working correctly: ", isCocoaPodsWorkingCorrectly);
110
120
121
+ const nativeScriptCliVersion = await sysInfo.getNativeScriptCliVersion();
122
+ console.log("{N} CLI version: ", nativeScriptCliVersion);
123
+
124
+ const xcprojInfo = await sysInfo.getXcprojInfo();
125
+ console.log("xcproj info: ", xcprojInfo);
126
+
127
+ const isCocoaPodsUpdateRequired = await sysInfo.isCocoaPodsUpdateRequired();
128
+ console.log("is CocoaPods update required: ", isCocoaPodsUpdateRequired);
129
+
111
130
const sysInfoData = await sysInfo.getSysInfo();
112
131
console.log("sysInfo: ", sysInfoData);
113
132
}
114
133
115
134
main();
116
135
117
136
```
118
-
137
+
119
138
- Interfaces:
120
139
```TypeScript
121
140
/**
@@ -138,7 +157,7 @@ Library that helps identifying if the environment can be used for development of
138
157
* Returns the currently installed version of Xcode.
139
158
* @return {Promise<string>} Returns the currently installed version of Xcode or null if Xcode is not installed or executed on Linux or Windows.
140
159
*/
141
- getXCodeVersion (): Promise<string>;
160
+ getXcodeVersion (): Promise<string>;
142
161
143
162
/**
144
163
* Returns the currently installed Node.js version.
@@ -156,7 +175,7 @@ Library that helps identifying if the environment can be used for development of
156
175
* Returns the xcodeproj gem location.
157
176
* @return {Promise<string>} Returns the xcodeproj gem location. If the the xcodeproj gem is not installed it will return null.
158
177
*/
159
- getXCodeProjGemLocation (): Promise<string>;
178
+ getXcodeprojGemLocation (): Promise<string>;
160
179
161
180
/**
162
181
* Checks if iTunes is installed.
@@ -212,6 +231,24 @@ Library that helps identifying if the environment can be used for development of
212
231
*/
213
232
isCocoaPodsWorkingCorrectly(): Promise<boolean>;
214
233
234
+ /**
235
+ * Returns the version of the globally installed NativeScript CLI.
236
+ * @return {Promise<string>} Returns the version of the globally installed NativeScript CLI.
237
+ */
238
+ getNativeScriptCliVersion(): Promise<string>;
239
+
240
+ /**
241
+ * Checks if xcproj is required to build projects and if it is installed.
242
+ * @return {Promise<IXcprojInfo>} Returns the collected information aboud xcproj.
243
+ */
244
+ getXcprojInfo(): Promise<IXcprojInfo>;
245
+
246
+ /**
247
+ * Checks if the current version of CocoaPods is compatible with the installed Xcode.
248
+ * @return {boolean} true if an update us require.
249
+ */
250
+ isCocoaPodsUpdateRequired(): Promise<boolean>;
251
+
215
252
/**
216
253
* Returns the whole system information.
217
254
* @return {Promise<ISysInfoData>} The system information.
@@ -342,5 +379,63 @@ Library that helps identifying if the environment can be used for development of
342
379
* @type {boolean}
343
380
*/
344
381
isCocoaPodsWorkingCorrectly: boolean;
382
+
383
+ /**
384
+ * NativeScript CLI version string, as returned by `tns --version`.
385
+ * @type {string}
386
+ */
387
+ nativeScriptCliVersion: string;
388
+
389
+ /**
390
+ * Information about xcproj.
391
+ * @type {string}
392
+ */
393
+ xcprojInfo: IXcprojInfo
394
+
395
+ /**
396
+ * true if the system requires xcproj to build projects successfully and the CocoaPods version is not compatible with the Xcode.
397
+ */
398
+ isCocoaPodsUpdateRequired: boolean;
399
+ }
400
+
401
+ /**
402
+ * Describes information about xcproj brew formula.
403
+ */
404
+ interface IXcprojInfo {
405
+ /**
406
+ * Determines whether the system needs xcproj to execute ios builds sucessfully.
407
+ */
408
+ shouldUseXcproj: boolean;
409
+
410
+ /**
411
+ * Determines whether xcproj can be called from the command line.
412
+ */
413
+ xcprojAvailable: boolean;
414
+ }
415
+ ```
416
+
417
+ * Module ` constants ` :
418
+ - Usage:
419
+ ```TypeScript
420
+ import { constants } from "nativescript-doctor"
421
+
422
+ function main() {
423
+ for(let constantName in constants) {
424
+ console.log(`${constantName}: ${constants[constantName]}`);
425
+ }
426
+ }
427
+
428
+ main();
429
+ ```
430
+
431
+ - Interfaces:
432
+ ```TypeScript
433
+ /**
434
+ * Describes the constants used in the module.
435
+ */
436
+ interface IConstants {
437
+ ANDROID_PLATFORM_NAME: string;
438
+ IOS_PLATFORM_NAME: string;
439
+ SUPPORTED_PLATFORMS: string[];
345
440
}
346
441
```
0 commit comments