Add iOS app with Node.js/TypeScript backend for BeMyEars project. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
37 lines
886 B
Bash
Executable File
37 lines
886 B
Bash
Executable File
#!/bin/zsh
|
|
set -o pipefail
|
|
|
|
# --- Configuration ---
|
|
SCHEME="BeMyEars"
|
|
DEVICE_NAME="iPhone 17 Pro"
|
|
# Falling back to 16 Pro as 17 might not be in all sim runtimes yet,
|
|
# but easy to change if needed.
|
|
BUILD_PATH="./build"
|
|
|
|
echo "🔍 Checking compilation for $SCHEME..."
|
|
|
|
# Ensure xcbeautify is installed or fallback to cat
|
|
if ! command -v xcbeautify &> /dev/null; then
|
|
echo "⚠️ xcbeautify not found, using plain output."
|
|
FORMATTER="cat"
|
|
else
|
|
FORMATTER="xcbeautify"
|
|
fi
|
|
|
|
# Build Only
|
|
env -u CC -u CXX -u LIBCLANG_PATH xcodebuild \
|
|
-workspace "BeMyEars.xcworkspace" \
|
|
-scheme "$SCHEME" \
|
|
-destination "platform=iOS Simulator,name=$DEVICE_NAME" \
|
|
-configuration Debug \
|
|
-derivedDataPath "$BUILD_PATH" \
|
|
build | $FORMATTER
|
|
|
|
# Check exit code
|
|
if [ $? -eq 0 ]; then
|
|
echo "✅ Build Succeeded. No errors found."
|
|
else
|
|
echo "❌ Build Failed."
|
|
exit 1
|
|
fi
|