56 lines
1.6 KiB
Bash
Executable File
56 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# BlackRoad Watch - Xcode Project Setup
|
|
# Run this after installing Xcode to generate the .xcodeproj
|
|
|
|
set -e
|
|
|
|
PINK='\033[38;5;205m'
|
|
AMBER='\033[38;5;214m'
|
|
GREEN='\033[38;5;82m'
|
|
RESET='\033[0m'
|
|
|
|
echo -e "${PINK}[BR]${RESET} BlackRoad Watch - Project Setup"
|
|
echo ""
|
|
|
|
# Check for Xcode
|
|
if ! xcode-select -p &>/dev/null; then
|
|
echo -e "${AMBER}[!]${RESET} Xcode not found. Install from App Store first."
|
|
exit 1
|
|
fi
|
|
|
|
XCODE_PATH=$(xcode-select -p)
|
|
if [[ "$XCODE_PATH" == *"CommandLineTools"* ]]; then
|
|
echo -e "${AMBER}[!]${RESET} Only Command Line Tools found."
|
|
echo " Install Xcode.app from the App Store, then run:"
|
|
echo " sudo xcode-select -s /Applications/Xcode.app/Contents/Developer"
|
|
exit 1
|
|
fi
|
|
|
|
echo -e "${GREEN}[OK]${RESET} Xcode found at: $XCODE_PATH"
|
|
|
|
# Install xcodegen if needed
|
|
if ! command -v xcodegen &>/dev/null; then
|
|
echo -e "${AMBER}[*]${RESET} Installing XcodeGen..."
|
|
brew install xcodegen
|
|
fi
|
|
|
|
echo -e "${GREEN}[OK]${RESET} XcodeGen available"
|
|
|
|
# Generate project
|
|
cd "$(dirname "$0")"
|
|
echo -e "${AMBER}[*]${RESET} Generating Xcode project..."
|
|
xcodegen generate
|
|
|
|
echo ""
|
|
echo -e "${GREEN}[OK]${RESET} Project generated! Opening..."
|
|
open BlackRoadWatch.xcodeproj
|
|
|
|
echo ""
|
|
echo -e "${PINK}[BR]${RESET} Next steps:"
|
|
echo " 1. Set your Development Team in Xcode (Signing & Capabilities)"
|
|
echo " 2. Connect your iPhone"
|
|
echo " 3. Select 'BlackRoadWatch' scheme and build (Cmd+R)"
|
|
echo " 4. The watch app deploys automatically with the iPhone app"
|
|
echo ""
|
|
echo " Make sure the M1s Dock is on the same WiFi network as your iPhone!"
|