How to use the appium-ios-device.services.startInstallationProxyService function in appium-ios-device

To help you get started, we’ve selected a few appium-ios-device 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-xcuitest-driver / lib / commands / file-movement.js View on Github external
async function getAvailableBundleIds (udid) {
  const service = await services.startInstallationProxyService(udid);
  try {
    const applications = await service.listApplications({applicationType: 'User'});
    const bundleIds = [];
    for (const [key, value] of Object.entries(applications)) {
      if (!value.UIFileSharingEnabled) {
        continue;
      }
      bundleIds.push(key);
    }
    return bundleIds;
  } finally {
    service.close();
  }
}
github appium / appium-xcuitest-driver / lib / ios-deploy.js View on Github external
async isAppInstalled (bundleid) {
    const service = await services.startInstallationProxyService(this.udid);
    try {
      const applications = await service.lookupApplications({ bundleIds: bundleid });
      return !!applications[bundleid];
    } finally {
      service.close();
    }
  }
github appium / appium-xcuitest-driver / lib / ios-deploy.js View on Github external
async remove (bundleid) {
    const service = await services.startInstallationProxyService(this.udid);
    try {
      await service.uninstallApplication(bundleid);
    } finally {
      service.close();
    }
  }
github appium / appium-xcuitest-driver / lib / ios-deploy.js View on Github external
async installApplication (bundlePathOnPhone) {
    const notificationService = await services.startNotificationProxyService(this.udid);
    const installationService = await services.startInstallationProxyService(this.udid);
    const appInstalledNotification = new B((resolve) => {
      notificationService.observeNotification(APPLICATION_INSTALLED_NOTIFICATION, {notification: resolve});
    });
    try {
      await installationService.installApplication(bundlePathOnPhone, {PackageType: 'Developer'});
      try {
        await appInstalledNotification.timeout(APPLICATION_NOTIFICATION_TIMEOUT, `Could not get the application installed notification within ${APPLICATION_NOTIFICATION_TIMEOUT}ms but we will continue`);
      } catch (e) {
        log.warn(`Failed to receive the notification. Error: ${e.message}`);
      }
    } finally {
      installationService.close();
      notificationService.close();
    }
  }
github appium / appium-xcuitest-driver / lib / ios-deploy.js View on Github external
async getUserInstalledBundleIdsByBundleName (bundleName) {
    const service = await services.startInstallationProxyService(this.udid);
    try {
      const applications = await service.listApplications({applicationType: 'User'});
      return _.reduce(applications, (acc, {CFBundleName}, key) => {
        if (CFBundleName === bundleName) {
          acc.push(key);
        }
        return acc;
      }, []);
    } finally {
      service.close();
    }
  }