Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Apple will always throw some exception because we don't provide a -t.
// but we just care about launching simulator with chosen UDID
}
if (!fs.existsSync('ios')) {
log.info(`Generating runner iOS project`)
await generateRunner(runnerConfig)
} else {
log.info(`Re-generating runner container`)
await generateContainerForRunner(runnerConfig)
}
const device = answer.device
shell.cd(`${this.path}/ios`)
execSync(`xcodebuild -scheme ErnRunner -destination 'platform=iOS Simulator,name=${device.name}' SYMROOT="${this.path}/ios/build" build`)
await simctl.installApp(device.udid, `${this.path}/ios/build/Debug-iphonesimulator/ErnRunner.app`)
await simctl.launch(device.udid, 'com.yourcompany.ernrunner')
}
export async function installApplicationOnSimulator (deviceUdid: string, pathToAppFile: string) {
return simctl.installApp(deviceUdid, pathToAppFile)
}
return loadApp(appUrl).then(path => {
return simctl.installApp(udid, path).then(() => {
openApp(udid, schema, params);
return result;
});
});
}
async installApp (app) {
return await simctl.installApp(this.udid, app);
}