How to use the appium-xcode.getMaxIOSSDK function in appium-xcode

To help you get started, we’ve selected a few appium-xcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appium / appium-ios-driver / lib / utils.js View on Github external
async function prepareIosOpts (opts) {
  opts.backendRetries = 4;
  opts.withoutDelay = !opts.nativeInstrumentsLib;
  opts.reset = !opts.noReset;
  opts.initialOrientation = opts.deviceOrientation ||
                            opts.orientation ||
                            'PORTRAIT';
  opts.useRobot = opts.robotPort > 0;
  opts.robotUrl = opts.useRobot ?
    `http://${opts.robotAddress}:${opts.robotPort}` : null;
  if (opts.locationServicesAuthorized && !opts.bundleId) {
    throw new Error('You must set the bundleId cap if using locationServicesEnabled');
  }

  opts.platformVersion = opts.platformVersion || await xcode.getMaxIOSSDK();
  let pv = parseFloat(opts.platformVersion);
  if (pv < 8) {
    logger.warn(`iOS version ${opts.platformVersion} support has been ` +
                `deprecated and will be removed in a future version of ` +
                `Appium.`);
  }
  opts.localizableStringsDir = opts.localizableStringsDir || 'en.lproj';
  opts.autoAcceptAlerts = _.isNull(opts.autoAcceptAlerts) || _.isUndefined(opts.autoAcceptAlerts) ? false : opts.autoAcceptAlerts;
  opts.autoDismissAlerts = _.isNull(opts.autoDismissAlerts) || _.isUndefined(opts.autoDismissAlerts) ? false : opts.autoDismissAlerts;

  if ((opts.browserName || '').toLowerCase() === 'safari' ||
      (opts.app || '').toLowerCase() === 'safari' ||
      (opts.bundleId || '').toLowerCase() === SAFARI_BUNDLE) {
    // preparing a safari session
    if (opts.udid) {
      // on a real device
github appium / appium-xcuitest-driver / lib / utils.js View on Github external
async function getAndCheckIosSdkVersion () {
  try {
    return await xcode.getMaxIOSSDK();
  } catch (err) {
    log.errorAndThrow(`Could not determine iOS SDK version: ${err.message}`);
  }
}
github appium / appium-ios-driver / lib / safari-launcher.js View on Github external
async function buildAll () {
  logger.info('Building SafariLauncher');
  let sdkVer = await xcode.getMaxIOSSDK();
  for (let sdk of sdks) {
    let fullSdk = sdk + sdkVer;
    await buildApp(SAFARI_LAUNCHER_REPO, fullSdk);
  }
  logger.info('Finished building SafariLauncher');
}
github appium / appium-ios-driver / lib / safari-launcher.js View on Github external
async function cleanAll () {
  logger.info('Cleaning SafariLauncher');
  let sdkVer = await xcode.getMaxIOSSDK();
  for (let sdk of sdks) {
    let fullSdk = sdk + sdkVer;
    await cleanApp(SAFARI_LAUNCHER_REPO, fullSdk);
  }
  await fs.rimraf(SAFARI_LAUNCHER_DIR);
  logger.info('Finished cleaning SafariLauncher');
}
github appium / appium-ios-driver / lib / utils.js View on Github external
async function getAndCheckIosSdkVersion () {
  let versionNumber;
  try {
    versionNumber = await xcode.getMaxIOSSDK();
  } catch (err) {
    logger.error('Could not determine iOS SDK version');
    throw err;
  }
  return versionNumber;
}