/**
 * Xcode build and test functionality
 * Single Responsibility: Building and testing projects
 */
import { exec as nodeExec } from 'child_process';
import { BuildConfiguration, TestConfiguration, TestResult, Platform } from './types.js';
/**
 * Custom error class for build failures with detailed output
 */
export declare class BuildError extends Error {
    readonly buildOutput: string;
    readonly stderr: string;
    readonly originalError: any;
    constructor(message: string, buildOutput?: string, stderr?: string, originalError?: any);
}
export type ExecFunction = typeof nodeExec;
export type ExecAsyncFunction = (command: string, options?: any) => Promise<{
    stdout: string;
    stderr: string;
}>;
/**
 * XcodeBuilder with dependency injection for testability
 */
export declare class XcodeBuilder {
    private static readonly DEFAULT_TIMEOUT;
    private static readonly MAX_BUFFER;
    private readonly execAsync;
    private static defaultInstance;
    constructor(execFunc?: ExecFunction);
    /**
     * Get the default instance (singleton pattern)
     */
    private static getDefaultInstance;
    /**
     * Build an Xcode project (instance method)
     * @deprecated Use BuildTool directly instead
     */
    buildProjectInstance(config: BuildConfiguration): Promise<{
        success: boolean;
        output: string;
        appPath?: string;
    }>;
    /**
     * Test an Xcode project (instance method)
     */
    testProjectInstance(config: TestConfiguration): Promise<TestResult>;
    /**
     * Test a Swift Package Manager module (instance method)
     */
    testSPMModuleInstance(packagePath: string, platform?: Platform, testFilter?: string, osVersion?: string): Promise<TestResult>;
    /**
     * Find the built app in DerivedData (instance method)
     */
    private findBuiltAppInstance;
    /**
     * Clean build artifacts, DerivedData, or test results
     */
    cleanProjectInstance(config: {
        projectPath?: string;
        scheme?: string;
        platform?: Platform;
        configuration?: string;
        cleanTarget?: 'build' | 'derivedData' | 'testResults' | 'all';
        derivedDataPath?: string;
    }): Promise<{
        success: boolean;
        message: string;
    }>;
    /**
     * List available schemes in a project
     */
    listSchemesInstance(projectPath: string, shared?: boolean): Promise<string[]>;
    /**
     * Get build settings for a scheme
     */
    getBuildSettingsInstance(projectPath: string, scheme: string, configuration?: string, platform?: Platform): Promise<Record<string, string>>;
    /**
     * Get project information (bundle ID, version, etc.)
     */
    getProjectInfoInstance(projectPath: string): Promise<any>;
    /**
     * List targets in a project
     */
    listTargetsInstance(projectPath: string): Promise<string[]>;
    /**
     * Archive a project
     */
    archiveProjectInstance(projectPath: string, scheme: string, platform: Platform, configuration: string, archivePath?: string): Promise<string>;
    /**
     * Export IPA from archive
     */
    exportIPAInstance(archivePath: string, exportPath?: string, exportMethod?: string): Promise<string>;
    /**
     * Parse test output to extract results (static for easy testing)
     */
    static parseTestOutput(output: string): TestResult;
    /**
     * @deprecated Use BuildTool directly instead
     */
    static buildProject(config: BuildConfiguration): Promise<{
        success: boolean;
        output: string;
        appPath?: string;
    }>;
    static testProject(config: TestConfiguration): Promise<TestResult>;
    static testSPMModule(packagePath: string, platform?: Platform, testFilter?: string, osVersion?: string): Promise<TestResult>;
    static cleanProject(config: {
        projectPath?: string;
        scheme?: string;
        platform?: Platform;
        configuration?: string;
        cleanTarget?: 'build' | 'derivedData' | 'testResults' | 'all';
        derivedDataPath?: string;
    }): Promise<{
        success: boolean;
        message: string;
    }>;
}
//# sourceMappingURL=xcodeBuilder.d.ts.map