appium-xcode
Version:
Interact with Xcode
81 lines • 3.73 kB
TypeScript
import _ from 'lodash';
import type { XcodeVersion } from './types';
/**
* Retrieves the full path to Xcode Developer subfolder via xcode-select
*
* @param timeout The maximum timeout for xcode-select execution
* @returns Full path to Xcode Developer subfolder
* @throws {Error} If it is not possible to retrieve a proper path
*/
export declare function getPathFromXcodeSelect(timeout?: number): Promise<string>;
/**
* Retrieves the full path to Xcode Developer subfolder via `DEVELOPER_DIR` environment variable
*
* @returns Full path to Xcode Developer subfolder
* @throws {Error} If it is not possible to retrieve a proper path
* @privateRemarks This method assumes `DEVELOPER_DIR` is defined.
*/
export declare function getPathFromDeveloperDir(): Promise<string>;
/**
* Retrieves the full path to Xcode Developer subfolder.
* If `DEVELOPER_DIR` environment variable is provided then its value has a priority.
* @param timeout The maximum timeout for xcode-select execution
* @returns Full path to Xcode Developer subfolder timeout
* @throws {Error} If there was an error while retrieving the path.
*/
export declare const getPath: ((timeout?: number) => Promise<string>) & _.MemoizedFunction;
/**
* Retrieves Xcode version
*
* @param parse Whether to parse the version to a XcodeVersion version
* @param retries How many retries to apply for getting the version number
* @param timeout Timeout of milliseconds to wait for terminal commands
* @returns Xcode version depending on the value of `parse` flag
* @throws {Error} If there was a failure while retrieving the version
*/
export declare function getVersion(parse: false, retries?: number, timeout?: number): Promise<string>;
export declare function getVersion(parse: true, retries?: number, timeout?: number): Promise<XcodeVersion>;
/**
* Check https://trac.macports.org/wiki/XcodeVersionInfo
* to see the actual mapping between clang and other components.
*
* @returns The actual Clang version in x.x.x.x or x.x.x format,
* which is supplied with Command Line Tools. `null` is returned
* if CLT are not installed.
*/
export declare function getClangVersion(): Promise<string | null>;
/**
* Retrieves the maximum version of iOS SDK supported by the installed Xcode
*
* @param timeout Timeout of milliseconds to wait for terminal commands
* @returns The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export declare function getMaxIOSSDKWithoutRetry(timeout?: number): Promise<string>;
/**
* Retrieves the maximum version of iOS SDK supported by the installed Xcode
*
* @param retries The maximum number of retries
* @param timeout Timeout of milliseconds to wait for terminal commands
* @returns The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export declare const getMaxIOSSDK: ((retries?: number, timeout?: number) => Promise<string | null>) & _.MemoizedFunction;
/**
* Retrieves the maximum version of tvOS SDK supported by the installed Xcode
*
* @param timeout Timeout of milliseconds to wait for terminal commands
* @returns The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export declare function getMaxTVOSSDKWithoutRetry(timeout?: number): Promise<string>;
/**
* Retrieves the maximum version of tvOS SDK supported by the installed Xcode
*
* @param timeout Timeout of milliseconds to wait for terminal commands
* @param retries The maximum number of retries
* @returns The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export declare const getMaxTVOSSDK: ((retries?: number, timeout?: number) => Promise<string>) & _.MemoizedFunction;
//# sourceMappingURL=xcode.d.ts.map