#!/usr/bin/env bash set -euo pipefail section() { printf '\n== %s ==\n' "$1" } section "Xcode Select" if command -v xcode-select >/dev/null 2>&1; then xcode-select -p || true else echo "xcode-select не найден." fi section "Command Line Tools" if pkgutil --pkg-info=com.apple.pkg.CLTools_Executables >/dev/null 2>&1; then pkgutil --pkg-info=com.apple.pkg.CLTools_Executables else echo "Пакет Command Line Tools не зарегистрирован." fi section "Xcode" if command -v xcodebuild >/dev/null 2>&1; then xcodebuild -version 2>&1 || true else echo "xcodebuild не найден." fi section "SDK" if command -v xcodebuild >/dev/null 2>&1; then xcodebuild -showsdks 2>&1 | sed -n '1,40p' || true fi if command -v xcrun >/dev/null 2>&1; then sdk_path=$(xcrun --show-sdk-path 2>/dev/null || true) echo "xcrun SDK path: ${sdk_path:-не определён}" fi section "Swift" if command -v swift >/dev/null 2>&1; then swift --version 2>&1 || true else echo "swift не найден." fi section "Simulator Runtimes" if command -v xcrun >/dev/null 2>&1; then xcrun simctl list runtimes 2>&1 || true else echo "xcrun не найден." fi section "Available Simulator Devices" if command -v xcrun >/dev/null 2>&1; then xcrun simctl list devices available 2>&1 | sed -n '1,30p' || true fi