35 lines
1.3 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Rebreak Native — Dev auf physischem iPhone (kein Simulator).
#
# Was es macht:
# - Killt alte Metro-Instanzen auf 8081 (saubere Session)
# - Startet Metro mit --host lan damit iPhone via WiFi connecten kann
# - Druckt deine LAN-IP zum manuellen Eintragen falls Bonjour failt
#
# Auf iPhone:
# 1. Mac + iPhone müssen im SELBEN WiFi sein
# 2. App komplett killen (App-Switcher → swipe up)
# 3. App neu öffnen — dev-client sollte Metro automatisch finden
# 4. Falls nicht: dev-launcher → "Enter URL manually" → http://<LAN-IP>:8081
#
# WICHTIG: Im Metro-Terminal NICHT `i` drücken — sonst startet Simulator!
# Nur `r` für Reload.
set -e
cd "$(dirname "$0")"
echo "🧹 Killing old Metro on port 8081..."
lsof -ti:8081 | xargs kill -9 2>/dev/null || true
echo ""
echo "📡 Mac LAN-IP für iPhone:"
ipconfig getifaddr en0 2>/dev/null || ipconfig getifaddr en1 2>/dev/null || echo " (kein WiFi/Ethernet detected)"
echo ""
echo " Falls dev-client Metro nicht automatisch findet:"
echo " im iPhone-Launcher → 'Enter URL manually' → http://<LAN-IP>:8081"
echo ""
echo "🚀 Starting Metro with --host lan..."
echo " (Drücke 'r' für Reload, NICHT 'i' — sonst startet Simulator!)"
echo ""
exec pnpm expo start --host lan --clear --dev-client