Files
telegram-tui/scripts/check-ios-prereqs.sh
2026-05-20 22:26:53 +03:00

20 lines
721 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if [[ -z "${DEVELOPER_DIR:-}" && -d /Applications/Xcode.app/Contents/Developer ]]; then
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
fi
printf 'Developer dir: %s\n' "${DEVELOPER_DIR:-$(xcode-select -p 2>/dev/null || true)}"
xcodebuild -version
xcrun simctl list devices available
swift --version
if ! xcrun simctl list devices available | grep -Eq 'iPhone|iPad'; then
printf 'No available iOS simulator devices found. Install the iOS platform from Xcode Settings > Components or run:\n' >&2
printf ' DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcodebuild -downloadPlatform iOS\n' >&2
exit 1
fi
printf 'iOS prerequisites are available.\n'