fix(native/dev): default REBREAK_ENABLE_FAMILY_CONTROLS=1 in local dev scripts

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.
This commit is contained in:
chahinebrini 2026-05-15 23:46:28 +02:00
parent d840247c98
commit 917361131d
2 changed files with 12 additions and 0 deletions

View File

@ -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 ""

View File

@ -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