/** * Pure parser for `xcodebuild -showBuildSettings -json` output. * * `xcodebuild` emits a JSON array of `{action, target, buildSettings}` objects * on stdout, but may print non-JSON warnings on stderr/stdout before or after * the array. We slice from the first `[` to the last `]` to extract the JSON * payload defensively. * * When multiple targets exist (e.g. an aggregate target alongside the app * target), we pick the one whose build settings declare `WRAPPER_EXTENSION === "app"`, * which is the actual application bundle. */ export interface BuildSettings { /** Absolute path to the build products directory (where the .app lands). */ builtProductsDir: string; /** Bundle wrapper name, e.g. `MyApp.app`. */ wrapperName: string; /** Executable name inside the bundle, e.g. `MyApp`. Used for `pgrep -ax`. */ executableName: string; /** App bundle identifier, e.g. `com.example.MyApp`. */ productBundleIdentifier: string; } /** * Parse `xcodebuild -showBuildSettings -json` stdout. Throws when the output * cannot be parsed or when the matched target is missing required keys. */ export declare function parseBuildSettingsJson(stdout: string): BuildSettings;