#!/bin/zsh set -o pipefail # Fail if xcodebuild fails, even with xcbeautify # --- Configuration --- SCHEME="CheapRetouch" BUILD_PATH="./build" echo "🔍 Checking compilation for $SCHEME..." # Build Only (No Install/Launch) # We use 'env -u' to hide Homebrew variables # We use '-derivedDataPath' to keep it isolated env -u CC -u CXX -u LIBCLANG_PATH xcodebuild \ -scheme "$SCHEME" \ -destination "platform=iOS Simulator,name=iPhone 17 Pro" \ -configuration Debug \ -derivedDataPath "$BUILD_PATH" \ build | xcbeautify # Check exit code of the pipeline if [ $? -eq 0 ]; then echo "✅ Build Succeeded. No errors found." else echo "❌ Build Failed." exit 1 fi