From 917361131d9d8a8349e4398f1ec473c7ceaf3a79 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Fri, 15 May 2026 23:46:28 +0200 Subject: [PATCH] fix(native/dev): default REBREAK_ENABLE_FAMILY_CONTROLS=1 in local dev scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When developing on a physical iPhone via `./dev-iphone.sh`, Metro runs with whatever env the user's shell has — and the FamilyControls flag was missing unless the user remembered to prefix every command with `REBREAK_ENABLE_FAMILY_CONTROLS=1 …`. Forgetting it meant `app.config.ts` evaluated `process.env.REBREAK_ENABLE_FAMILY_CONTROLS` to falsy, so the JS bundle had `extra.familyControlsEnabled = false` and the Blocker page kept showing "App-Lock — Bald" instead of the real LayerSwitchCard, even though the dev binary did have the FC entitlement. Local dev scripts now default the var to "1" with shell-level override (e.g. `REBREAK_ENABLE_FAMILY_CONTROLS=0 ./dev-iphone.sh` when you want to verify the TestFlight/prod fallback UI). EAS profile env (eas.json) keeps its own explicit setting and is unaffected. --- apps/rebreak-native/clean-ios.sh | 5 +++++ apps/rebreak-native/dev-iphone.sh | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/apps/rebreak-native/clean-ios.sh b/apps/rebreak-native/clean-ios.sh index bb3432b..2c224a5 100755 --- a/apps/rebreak-native/clean-ios.sh +++ b/apps/rebreak-native/clean-ios.sh @@ -26,6 +26,11 @@ cd "$(dirname "$0")" MODE="${1:-}" +# FamilyControls-Flag: default ON für lokale Dev-Builds (= entitlement aktiv). +# Override via `REBREAK_ENABLE_FAMILY_CONTROLS=0 ./clean-ios.sh ...`. +# Wird von plugins/with-rebreak-protection-ios.js + app.config.ts gelesen. +export REBREAK_ENABLE_FAMILY_CONTROLS="${REBREAK_ENABLE_FAMILY_CONTROLS:-1}" + echo "🧹 Rebreak Native iOS Clean" echo "===========================" echo "" diff --git a/apps/rebreak-native/dev-iphone.sh b/apps/rebreak-native/dev-iphone.sh index 4003d0b..ba47681 100755 --- a/apps/rebreak-native/dev-iphone.sh +++ b/apps/rebreak-native/dev-iphone.sh @@ -17,6 +17,13 @@ set -e cd "$(dirname "$0")" +# FamilyControls-Flag: default ON für lokale Dev-Builds, override via +# REBREAK_ENABLE_FAMILY_CONTROLS=0 ./dev-iphone.sh +# wenn man bewusst ohne FC testen will (z.B. TestFlight-Parity-Check). +# app.config.ts liest die Var um Constants.expoConfig.extra.familyControlsEnabled +# zu setzen → lib/protection.ts.FAMILY_CONTROLS_AVAILABLE → Blocker-UI. +export REBREAK_ENABLE_FAMILY_CONTROLS="${REBREAK_ENABLE_FAMILY_CONTROLS:-1}" + echo "🧹 Killing old Metro on port 8081..." lsof -ti:8081 | xargs kill -9 2>/dev/null || true