appium-xcuitest-driver 7.12.0 → 7.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/lib/app-utils.d.ts +35 -6
- package/build/lib/app-utils.d.ts.map +1 -1
- package/build/lib/app-utils.js +231 -11
- package/build/lib/app-utils.js.map +1 -1
- package/build/lib/commands/element.d.ts +8 -0
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +16 -0
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/desired-caps.d.ts +6 -2
- package/build/lib/desired-caps.d.ts.map +1 -1
- package/build/lib/desired-caps.js +3 -0
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.d.ts +36 -31
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +4 -87
- package/build/lib/driver.js.map +1 -1
- package/lib/app-utils.js +243 -10
- package/lib/commands/element.js +20 -0
- package/lib/desired-caps.js +3 -0
- package/lib/driver.js +6 -105
- package/npm-shrinkwrap.json +29 -29
- package/package.json +2 -2
package/build/lib/driver.d.ts
CHANGED
|
@@ -266,7 +266,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
266
266
|
};
|
|
267
267
|
readonly safariLogAllCommunicationHexDump: {
|
|
268
268
|
readonly isBoolean: true;
|
|
269
|
-
};
|
|
269
|
+
};
|
|
270
270
|
readonly safariSocketChunkSize: {
|
|
271
271
|
readonly isNumber: true;
|
|
272
272
|
};
|
|
@@ -334,6 +334,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
334
334
|
readonly safariIgnoreWebHostnames: {
|
|
335
335
|
readonly isString: true;
|
|
336
336
|
};
|
|
337
|
+
/** @type {string|null} */
|
|
337
338
|
readonly disableAutomaticScreenshots: {
|
|
338
339
|
readonly isBoolean: true;
|
|
339
340
|
};
|
|
@@ -350,15 +351,19 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
350
351
|
readonly isString: true;
|
|
351
352
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
352
353
|
};
|
|
354
|
+
/** @type {number|undefined} */
|
|
353
355
|
readonly enforceAppInstall: {
|
|
354
356
|
readonly isBoolean: true;
|
|
355
|
-
};
|
|
357
|
+
};
|
|
356
358
|
readonly skipTriggerInputEventAfterSendkeys: {
|
|
357
359
|
readonly isBoolean: true;
|
|
358
360
|
};
|
|
361
|
+
readonly sendKeyStrategy: {
|
|
362
|
+
readonly isString: true;
|
|
363
|
+
};
|
|
359
364
|
readonly skipSyncUiDialogTranslation: {
|
|
360
365
|
readonly isBoolean: true;
|
|
361
|
-
};
|
|
366
|
+
};
|
|
362
367
|
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
363
368
|
readonly isBoolean: true;
|
|
364
369
|
};
|
|
@@ -630,7 +635,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
630
635
|
};
|
|
631
636
|
readonly safariLogAllCommunicationHexDump: {
|
|
632
637
|
readonly isBoolean: true;
|
|
633
|
-
};
|
|
638
|
+
};
|
|
634
639
|
readonly safariSocketChunkSize: {
|
|
635
640
|
readonly isNumber: true;
|
|
636
641
|
};
|
|
@@ -698,6 +703,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
698
703
|
readonly safariIgnoreWebHostnames: {
|
|
699
704
|
readonly isString: true;
|
|
700
705
|
};
|
|
706
|
+
/** @type {string|null} */
|
|
701
707
|
readonly disableAutomaticScreenshots: {
|
|
702
708
|
readonly isBoolean: true;
|
|
703
709
|
};
|
|
@@ -714,15 +720,19 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
714
720
|
readonly isString: true;
|
|
715
721
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
716
722
|
};
|
|
723
|
+
/** @type {number|undefined} */
|
|
717
724
|
readonly enforceAppInstall: {
|
|
718
725
|
readonly isBoolean: true;
|
|
719
|
-
};
|
|
726
|
+
};
|
|
720
727
|
readonly skipTriggerInputEventAfterSendkeys: {
|
|
721
728
|
readonly isBoolean: true;
|
|
722
729
|
};
|
|
730
|
+
readonly sendKeyStrategy: {
|
|
731
|
+
readonly isString: true;
|
|
732
|
+
};
|
|
723
733
|
readonly skipSyncUiDialogTranslation: {
|
|
724
734
|
readonly isBoolean: true;
|
|
725
|
-
};
|
|
735
|
+
};
|
|
726
736
|
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
727
737
|
readonly isBoolean: true;
|
|
728
738
|
};
|
|
@@ -1117,15 +1127,14 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1117
1127
|
readonly command: "getViewportRect";
|
|
1118
1128
|
};
|
|
1119
1129
|
readonly 'mobile: startPerfRecord': {
|
|
1130
|
+
/** @type {string|null|undefined} */
|
|
1120
1131
|
readonly command: "mobileStartPerfRecord";
|
|
1121
1132
|
readonly params: {
|
|
1122
1133
|
readonly optional: readonly ["timeout", "profileName", "pid"];
|
|
1123
1134
|
};
|
|
1124
1135
|
};
|
|
1125
1136
|
readonly 'mobile: stopPerfRecord': {
|
|
1126
|
-
readonly command: "mobileStopPerfRecord";
|
|
1127
|
-
* @type {boolean|undefined}
|
|
1128
|
-
*/
|
|
1137
|
+
readonly command: "mobileStopPerfRecord";
|
|
1129
1138
|
readonly params: {
|
|
1130
1139
|
readonly optional: readonly ["remotePath", "user", "pass", "method", "profileName", "headers", "fileFieldName", "formFields"];
|
|
1131
1140
|
};
|
|
@@ -1145,7 +1154,10 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1145
1154
|
};
|
|
1146
1155
|
readonly 'mobile: listCertificates': {
|
|
1147
1156
|
readonly command: "mobileListCertificates";
|
|
1148
|
-
};
|
|
1157
|
+
}; /**
|
|
1158
|
+
* @type {any|null}
|
|
1159
|
+
* @privateRemarks needs types
|
|
1160
|
+
**/
|
|
1149
1161
|
readonly 'mobile: startLogsBroadcast': {
|
|
1150
1162
|
readonly command: "mobileStartLogsBroadcast";
|
|
1151
1163
|
};
|
|
@@ -1177,7 +1189,11 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1177
1189
|
readonly command: "getScreenInfo";
|
|
1178
1190
|
};
|
|
1179
1191
|
readonly 'mobile: pressButton': {
|
|
1180
|
-
readonly command: "mobilePressButton";
|
|
1192
|
+
readonly command: "mobilePressButton"; /**
|
|
1193
|
+
*
|
|
1194
|
+
* @param {XCUITestDriverOpts} opts
|
|
1195
|
+
* @param {boolean} shouldValidateCaps
|
|
1196
|
+
*/
|
|
1181
1197
|
readonly params: {
|
|
1182
1198
|
readonly required: readonly ["name"];
|
|
1183
1199
|
readonly optional: readonly ["durationSeconds"];
|
|
@@ -1787,7 +1803,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1787
1803
|
};
|
|
1788
1804
|
readonly safariLogAllCommunicationHexDump: {
|
|
1789
1805
|
readonly isBoolean: true;
|
|
1790
|
-
};
|
|
1806
|
+
};
|
|
1791
1807
|
readonly safariSocketChunkSize: {
|
|
1792
1808
|
readonly isNumber: true;
|
|
1793
1809
|
};
|
|
@@ -1855,6 +1871,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1855
1871
|
readonly safariIgnoreWebHostnames: {
|
|
1856
1872
|
readonly isString: true;
|
|
1857
1873
|
};
|
|
1874
|
+
/** @type {string|null} */
|
|
1858
1875
|
readonly disableAutomaticScreenshots: {
|
|
1859
1876
|
readonly isBoolean: true;
|
|
1860
1877
|
};
|
|
@@ -1871,15 +1888,19 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1871
1888
|
readonly isString: true;
|
|
1872
1889
|
readonly inclusionCaseInsensitive: readonly ["serial", "parallel", "ios-deploy"];
|
|
1873
1890
|
};
|
|
1891
|
+
/** @type {number|undefined} */
|
|
1874
1892
|
readonly enforceAppInstall: {
|
|
1875
1893
|
readonly isBoolean: true;
|
|
1876
|
-
};
|
|
1894
|
+
};
|
|
1877
1895
|
readonly skipTriggerInputEventAfterSendkeys: {
|
|
1878
1896
|
readonly isBoolean: true;
|
|
1879
1897
|
};
|
|
1898
|
+
readonly sendKeyStrategy: {
|
|
1899
|
+
readonly isString: true;
|
|
1900
|
+
};
|
|
1880
1901
|
readonly skipSyncUiDialogTranslation: {
|
|
1881
1902
|
readonly isBoolean: true;
|
|
1882
|
-
};
|
|
1903
|
+
};
|
|
1883
1904
|
readonly forceSimulatorSoftwareKeyboardPresence: {
|
|
1884
1905
|
readonly isBoolean: true;
|
|
1885
1906
|
};
|
|
@@ -1920,23 +1941,6 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1920
1941
|
*/
|
|
1921
1942
|
executeCommand(cmd: string, ...args: any[]): Promise<any>;
|
|
1922
1943
|
configureApp(): Promise<void>;
|
|
1923
|
-
/**
|
|
1924
|
-
* Unzip the given archive and find a matching .app bundle in it
|
|
1925
|
-
*
|
|
1926
|
-
* @param {string} appPath The path to the archive.
|
|
1927
|
-
* @param {number} depth [0] the current nesting depth. App bundles whose nesting level
|
|
1928
|
-
* is greater than 1 are not supported.
|
|
1929
|
-
* @returns {Promise<string>} Full path to the first matching .app bundle..
|
|
1930
|
-
* @throws If no matching .app bundles were found in the provided archive.
|
|
1931
|
-
*/
|
|
1932
|
-
unzipApp(appPath: string, depth?: number): Promise<string>;
|
|
1933
|
-
onPostConfigureApp({ cachedAppInfo, isUrl, appPath }: {
|
|
1934
|
-
cachedAppInfo: any;
|
|
1935
|
-
isUrl: any;
|
|
1936
|
-
appPath: any;
|
|
1937
|
-
}): Promise<false | {
|
|
1938
|
-
appPath: any;
|
|
1939
|
-
}>;
|
|
1940
1944
|
determineDevice(): Promise<{
|
|
1941
1945
|
device: any;
|
|
1942
1946
|
realDevice: boolean;
|
|
@@ -2067,6 +2071,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
2067
2071
|
/** @deprecated */
|
|
2068
2072
|
setValueImmediate: (this: XCUITestDriver, value: string, el: string) => Promise<void>;
|
|
2069
2073
|
setValue: (this: XCUITestDriver, value: any, el: any) => Promise<void>;
|
|
2074
|
+
setValueWithWebAtom: (this: XCUITestDriver, atomsElement: import("./commands/types").AtomsElement<string>, value: string | string[]) => Promise<void>;
|
|
2070
2075
|
keys: (this: XCUITestDriver, value: string[]) => Promise<void>;
|
|
2071
2076
|
clear: (this: XCUITestDriver, el: any) => Promise<void>;
|
|
2072
2077
|
getContentSize: (this: XCUITestDriver, el: any) => Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":"AA+KA;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBE,0BAA0B;;;;;;;;;;;;;;;;;IAiB1B,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAC7C,uEAAmD;IACnD,uDAAqD;IACrD,mEAAqD;IACrD,wDAAyD;IACzD,+DAA2D;IAC3D,iHAAiD;IACjD,iGAA2D;IAC3D,wJAAyD;IACzD,0FAAyE;IACzE,oCAAmD;IACnD,mFAAmD;IACnD,oHAA2E;IAC3E,8EAAuD;IACvD,8DAA6D;IAC7D,qFAAiE;IACjE,+DAA+D;IAC/D,qGAA2F;IAC3F,mHAA+E;IAC/E,+DAAmD;IACnD,8GAA+D;IAC/D,0DAAqD;IACrD,2EAAiD;IACjD,uEAAmD;IACnD,sDAAiE;IACjE,qHAAuH;IACvH,+HAAqF;IAKrF,oTAA4D;IAC5D,sFAAgF;IAChF,qEAA4E;IAC5E,2FAAwF;IAKxF,+LAA0G;IAC1G,8HAA8G;IAC9G,yaAAwG;CACzG;;0FAgBY,OAAO,eAAe,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC;0CAI9C,KAAK,kBAAkB,EAAE,mBAAmB,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC;;;;;aAK3F,OAAO;;;;mBACP,OAAO;;wCAIR,4BAA4B;iCAC5B,OAAO,eAAe,EAAE,UAAU,CAAC,yBAAyB,CAAC;0BAC7D,OAAO,kBAAkB,EAAE,WAAW;2BACtC,OAAO,cAAc,EAAE,YAAY;wBACnC,OAAO,sBAAsB,EAAE,SAAS;2BAjoEJ,eAAe;yBAMzC,WAAW;2BA4B3B,eAAe;+BAnCO,uBAAuB;+BACH,eAAe;sBAC1B,gBAAgB;sCAmBlB,gBAAgB"}
|
package/build/lib/driver.js
CHANGED
|
@@ -30,8 +30,6 @@ const simulator_management_1 = require("./simulator-management");
|
|
|
30
30
|
const utils_1 = require("./utils");
|
|
31
31
|
const SHUTDOWN_OTHER_FEAT_NAME = 'shutdown_other_sims';
|
|
32
32
|
const CUSTOMIZE_RESULT_BUNDLE_PATH = 'customize_result_bundle_path';
|
|
33
|
-
const SUPPORTED_EXTENSIONS = [app_utils_1.IPA_EXT, app_utils_1.APP_EXT];
|
|
34
|
-
const MAX_ARCHIVE_SCAN_DEPTH = 1;
|
|
35
33
|
const defaultServerCaps = {
|
|
36
34
|
webStorageEnabled: false,
|
|
37
35
|
locationContextEnabled: false,
|
|
@@ -259,6 +257,7 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
259
257
|
/** @deprecated */
|
|
260
258
|
this.setValueImmediate = commands_1.default.elementExtensions.setValueImmediate;
|
|
261
259
|
this.setValue = commands_1.default.elementExtensions.setValue;
|
|
260
|
+
this.setValueWithWebAtom = commands_1.default.elementExtensions.setValueWithWebAtom;
|
|
262
261
|
this.keys = commands_1.default.elementExtensions.keys;
|
|
263
262
|
this.clear = commands_1.default.elementExtensions.clear;
|
|
264
263
|
this.getContentSize = commands_1.default.elementExtensions.getContentSize;
|
|
@@ -1175,93 +1174,11 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
1175
1174
|
return;
|
|
1176
1175
|
}
|
|
1177
1176
|
this.opts.app = await this.helpers.configureApp(this.opts.app, {
|
|
1178
|
-
onPostProcess:
|
|
1179
|
-
|
|
1177
|
+
onPostProcess: app_utils_1.onPostConfigureApp.bind(this),
|
|
1178
|
+
onDownload: app_utils_1.onDownloadApp.bind(this),
|
|
1179
|
+
supportedExtensions: app_utils_1.SUPPORTED_EXTENSIONS,
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
|
-
/**
|
|
1183
|
-
* Unzip the given archive and find a matching .app bundle in it
|
|
1184
|
-
*
|
|
1185
|
-
* @param {string} appPath The path to the archive.
|
|
1186
|
-
* @param {number} depth [0] the current nesting depth. App bundles whose nesting level
|
|
1187
|
-
* is greater than 1 are not supported.
|
|
1188
|
-
* @returns {Promise<string>} Full path to the first matching .app bundle..
|
|
1189
|
-
* @throws If no matching .app bundles were found in the provided archive.
|
|
1190
|
-
*/
|
|
1191
|
-
async unzipApp(appPath, depth = 0) {
|
|
1192
|
-
if (depth > MAX_ARCHIVE_SCAN_DEPTH) {
|
|
1193
|
-
throw new Error('Nesting of package bundles is not supported');
|
|
1194
|
-
}
|
|
1195
|
-
const [rootDir, matchedPaths] = await (0, app_utils_1.findApps)(appPath, SUPPORTED_EXTENSIONS);
|
|
1196
|
-
if (lodash_1.default.isEmpty(matchedPaths)) {
|
|
1197
|
-
this.log.debug(`'${node_path_1.default.basename(appPath)}' has no bundles`);
|
|
1198
|
-
}
|
|
1199
|
-
else {
|
|
1200
|
-
this.log.debug(`Found ${support_1.util.pluralize('bundle', matchedPaths.length, true)} in ` +
|
|
1201
|
-
`'${node_path_1.default.basename(appPath)}': ${matchedPaths}`);
|
|
1202
|
-
}
|
|
1203
|
-
try {
|
|
1204
|
-
for (const matchedPath of matchedPaths) {
|
|
1205
|
-
const fullPath = node_path_1.default.join(rootDir, matchedPath);
|
|
1206
|
-
if (await (0, app_utils_1.isAppBundle)(fullPath)) {
|
|
1207
|
-
const supportedPlatforms = await (0, app_utils_1.fetchSupportedAppPlatforms)(fullPath);
|
|
1208
|
-
if (this.isSimulator() && !supportedPlatforms.some((p) => lodash_1.default.includes(p, 'Simulator'))) {
|
|
1209
|
-
this.log.info(`'${matchedPath}' does not have Simulator devices in the list of supported platforms ` +
|
|
1210
|
-
`(${supportedPlatforms.join(',')}). Skipping it`);
|
|
1211
|
-
continue;
|
|
1212
|
-
}
|
|
1213
|
-
if (this.isRealDevice() && !supportedPlatforms.some((p) => lodash_1.default.includes(p, 'OS'))) {
|
|
1214
|
-
this.log.info(`'${matchedPath}' does not have real devices in the list of supported platforms ` +
|
|
1215
|
-
`(${supportedPlatforms.join(',')}). Skipping it`);
|
|
1216
|
-
continue;
|
|
1217
|
-
}
|
|
1218
|
-
this.log.info(`'${matchedPath}' is the resulting application bundle selected from '${appPath}'`);
|
|
1219
|
-
return await (0, app_utils_1.isolateAppBundle)(fullPath);
|
|
1220
|
-
}
|
|
1221
|
-
else if (lodash_1.default.endsWith(lodash_1.default.toLower(fullPath), app_utils_1.IPA_EXT) && (await support_1.fs.stat(fullPath)).isFile()) {
|
|
1222
|
-
try {
|
|
1223
|
-
return await this.unzipApp(fullPath, depth + 1);
|
|
1224
|
-
}
|
|
1225
|
-
catch (e) {
|
|
1226
|
-
this.log.warn(`Skipping processing of '${matchedPath}': ${e.message}`);
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
finally {
|
|
1232
|
-
await support_1.fs.rimraf(rootDir);
|
|
1233
|
-
}
|
|
1234
|
-
throw new Error(`${this.opts.app} did not have any matching ${app_utils_1.APP_EXT} or ${app_utils_1.IPA_EXT} ` +
|
|
1235
|
-
`bundles. Please make sure the provided package is valid and contains at least one matching ` +
|
|
1236
|
-
`application bundle which is not nested.`);
|
|
1237
|
-
}
|
|
1238
|
-
async onPostConfigureApp({ cachedAppInfo, isUrl, appPath }) {
|
|
1239
|
-
// Pick the previously cached entry if its integrity has been preserved
|
|
1240
|
-
if (lodash_1.default.isPlainObject(cachedAppInfo) &&
|
|
1241
|
-
(await support_1.fs.stat(appPath)).isFile() &&
|
|
1242
|
-
(await support_1.fs.hash(appPath)) === cachedAppInfo.packageHash &&
|
|
1243
|
-
(await support_1.fs.exists(cachedAppInfo.fullPath)) &&
|
|
1244
|
-
(await support_1.fs.glob('**/*', {
|
|
1245
|
-
cwd: cachedAppInfo.fullPath,
|
|
1246
|
-
})).length === cachedAppInfo.integrity.folder) {
|
|
1247
|
-
this.log.info(`Using '${cachedAppInfo.fullPath}' which was cached from '${appPath}'`);
|
|
1248
|
-
return { appPath: cachedAppInfo.fullPath };
|
|
1249
|
-
}
|
|
1250
|
-
// Only local .app bundles that are available in-place should not be cached
|
|
1251
|
-
if (await (0, app_utils_1.isAppBundle)(appPath)) {
|
|
1252
|
-
return false;
|
|
1253
|
-
}
|
|
1254
|
-
// Extract the app bundle and cache it
|
|
1255
|
-
try {
|
|
1256
|
-
return { appPath: await this.unzipApp(appPath) };
|
|
1257
|
-
}
|
|
1258
|
-
finally {
|
|
1259
|
-
// Cleanup previously downloaded archive
|
|
1260
|
-
if (isUrl) {
|
|
1261
|
-
await support_1.fs.rimraf(appPath);
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
1182
|
async determineDevice() {
|
|
1266
1183
|
// in the one case where we create a sim, we will set this state
|
|
1267
1184
|
this.lifecycleData.createSim = false;
|