Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.opts.customSSLCert) {
if (await hasSSLCert(this.opts.customSSLCert, this.opts.udid)) {
log.info(`SSL cert '${_.truncate(this.opts.customSSLCert, {length: 20})}' already installed`);
} else {
log.info(`Installing ssl cert '${_.truncate(this.opts.customSSLCert, {length: 20})}'`);
await shutdownSimulator(this.opts.device);
await installSSLCert(this.opts.customSSLCert, this.opts.udid);
log.info(`Restarting Simulator so that SSL certificate installation takes effect`);
await this.startSim();
this.logEvent('customCertInstalled');
}
}
if (this.opts.launchWithIDB && this.isSimulator()) {
try {
const idb = new IDB({udid});
await idb.connect();
this.opts.device.idb = idb;
} catch (e) {
log.info(`idb will not be used for Simulator interaction. Original error: ${e.message}`);
}
}
this.logEvent('simStarted');
if (!isLogCaptureStarted) {
// Retry log capture if Simulator was not running before
await startLogCapture();
}
}
if (this.opts.app) {
await this.installAUT();