appium-xcode
Version:
Interact with Xcode
111 lines • 4.58 kB
TypeScript
export type XcodeVersion = {
/**
* Xcode version as a string
*/
versionString: string;
/**
* Xcode version as a float number
*/
versionFloat: number;
/**
* Major number of Xcode version
*/
major: number;
/**
* Minor number of Xcode version
*/
minor: number;
/**
* Patch number of Xcode version (if exists)
*/
patch?: number | undefined;
/**
* Returns Xcode version as a string
*/
toString: () => string;
};
/**
* Retrieves the full path to Xcode Developer subfolder.
* If `DEVELOPER_DIR` environment variable is provided then its value has a priority.
* @param {number} timeout The maximum timeout for xcode-select execution
* @returns {Promise<string>} Full path to Xcode Developer subfolder timeout
* @throws {Error} If there was an error while retrieving the path.
*/
export const getPath: ((timeout?: number) => Promise<string>) & _.MemoizedFunction;
/**
* @typedef {Object} XcodeVersion
* @property {string} versionString Xcode version as a string
* @property {number} versionFloat Xcode version as a float number
* @property {number} major Major number of Xcode version
* @property {number} minor Minor number of Xcode version
* @property {number} [patch] Patch number of Xcode version (if exists)
* @property {() => string} toString Returns Xcode version as a string
*/
/**
* Retrieves Xcode version
*
* @param {boolean} parse [false] Whether to parse the version to a XcodeVersion version
* @param {number} retries [2] How many retries to apply for getting the version number
* @param {number} timeout [15000] Timeout of milliseconds to wait for terminal commands
* @returns {Promise<XcodeVersion | string>} Xcode version depending on the value of `parse` flag
* @throws {Error} If there was a failure while retrieving the version
*/
export function getVersion(parse?: boolean, retries?: number, timeout?: number): Promise<XcodeVersion | string>;
/**
* Retrieves the maximum version of iOS SDK supported by the installed Xcode
*
* @param {number} timeout Timeout of milliseconds to wait for terminal commands
* @param {number} retries The maximum number of retries
* @returns {string} The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export const getMaxIOSSDK: ((retries?: any, timeout?: any) => Promise<string | null>) & _.MemoizedFunction;
/**
* Retrieves the maximum version of iOS SDK supported by the installed Xcode
*
* @param {number} timeout [15000] Timeout of milliseconds to wait for terminal commands
* @returns {Promise<string>} The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export function getMaxIOSSDKWithoutRetry(timeout?: number): Promise<string>;
/**
* Retrieves the maximum version of tvOS SDK supported by the installed Xcode
*
* @throws {Error} If the SDK version number cannot be determined
*/
export const getMaxTVOSSDK: ((retries?: number, timeout?: number) => Promise<string>) & _.MemoizedFunction;
/**
* Retrieves the maximum version of tvOS SDK supported by the installed Xcode
*
* @param {number} timeout Timeout of milliseconds to wait for terminal commands
* @returns {Promise<string>} The SDK version
* @throws {Error} If the SDK version number cannot be determined
*/
export function getMaxTVOSSDKWithoutRetry(timeout?: number): Promise<string>;
/**
* Check https://trac.macports.org/wiki/XcodeVersionInfo
* to see the actual mapping between clang and other components.
*
* @returns {Promise<string|null>} 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 function getClangVersion(): Promise<string | null>;
/**
* Retrieves the full path to Xcode Developer subfolder via `DEVELOPER_DIR` environment variable
*
* @returns {Promise<string>} 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 function getPathFromDeveloperDir(): Promise<string>;
/**
* Retrieves the full path to Xcode Developer subfolder via xcode-select
*
* @param {number} timeout The maximum timeout for xcode-select execution
* @returns {Promise<string>} Full path to Xcode Developer subfolder
* @throws {Error} If it is not possible to retrieve a proper path
*/
export function getPathFromXcodeSelect(timeout?: number): Promise<string>;
import _ from 'lodash';
//# sourceMappingURL=xcode.d.ts.map