Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async isAppInstalled (bundleId) {
try {
const appContainer = await getAppContainer(this.udid, bundleId, false);
return appContainer.endsWith('.app');
} catch (err) {
// get_app_container subcommand fails for system applications,
// so we try the hidden appinfo subcommand, which prints correct info for
// system/hidden apps
try {
const info = await appInfo(this.udid, bundleId);
return info.includes('ApplicationType');
} catch (e) {
return false;
}
}
}
async (x) => await getAppContainer(device.udid, x));
log.info(`Parsed bundle identifier '${bundleId}' from '${remotePath}'. ` +
async (appBundle, containerType) => await getAppContainer(device.udid, appBundle, null, containerType));
log.info(`Parsed bundle identifier '${bundleId}' from '${remotePath}'. ` +