fix(protection): Layer 2 — Family Controls default-on + Resource-Bundle-Pfad

- familyControlsEnabled jetzt default-on (Apple-Distribution-Entitlement
  freigegeben); nur REBREAK_ENABLE_FAMILY_CONTROLS=0 schaltet ab.
- gambling-domains.json ins Pod-Verzeichnis verschoben + Podspec resource_bundles
  auf within-pod-Pfad korrigiert — CocoaPods buendelt keine Dateien ausserhalb
  des Pod-Roots (Bundle blieb sonst leer → Layer 2 griff nicht).
- Layer 2 (webContent-Filter) damit verifiziert funktionierend.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-05-21 20:13:57 +02:00
parent ad51ce5099
commit 50d3c6a8e1
4 changed files with 16 additions and 12 deletions

View File

@ -138,12 +138,12 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
//
// Der Wert MUSS mit dem Entitlement-Gating im Plugin übereinstimmen:
// plugins/with-rebreak-protection-ios.js setzt das family-controls-Entitlement
// NUR wenn REBREAK_ENABLE_FAMILY_CONTROLS==='1'. Diese Flag ist nur in
// development-Builds gesetzt. → familyControlsEnabled IDENTISCH koppeln,
// sonst bietet die App ein Feature an das im Build sandbox-blockiert ist.
// Sobald Apple das Distribution-Entitlement freigibt: Flag in eas.json
// preview/production env setzen — dann zieht beides automatisch.
familyControlsEnabled: process.env.REBREAK_ENABLE_FAMILY_CONTROLS === "1",
// mit derselben Bedingung. Family Controls ist Kern-Funktion und Apples
// Distribution-Entitlement ist freigegeben (v0.3.4) → DEFAULT AN. Nur ein
// explizites `REBREAK_ENABLE_FAMILY_CONTROLS=0` schaltet es ab (Escape-Hatch
// für FC-lose Test-Builds). Konsequenz: jeder Build braucht ein
// Provisioning-Profil mit FC-Capability — für den ReBreak-Apple-Account gegeben.
familyControlsEnabled: process.env.REBREAK_ENABLE_FAMILY_CONTROLS !== "0",
// iOS-NEURLFilter / PIR-Server. Der Auth-Token kommt aus der Build-Umgebung
// (Infisical staging/PIR_AUTH_TOKEN) — NIEMALS committen. Lokaler Dev-Build:
// `PIR_AUTH_TOKEN=… npx expo run:ios --device`.

View File

@ -27,9 +27,11 @@ Pod::Spec.new do |s|
# Layer-2 (webContent-Filter): gebündelte Gambling-Domain-Liste pro Land.
# Wird als eigenständiges Resource-Bundle (RebreakProtectionResources.bundle)
# ins App-Bundle gepackt — RebreakProtectionModule.swift liest es zur Laufzeit
# via Bundle(for:)/url(forResource:). Pfad relativ zur Podspec → zeigt auf die
# von der Aufgabe vorgegebene Quelle apps/rebreak-native/assets/protection/.
# via RebreakProtectionResources.bundle/gambling-domains.json.
# WICHTIG: Die JSON MUSS im Pod-Verzeichnis liegen (neben dieser Podspec).
# CocoaPods bündelt resource_bundles-Dateien NICHT, wenn der Pfad aus dem
# Pod-Root herauszeigt (`../../../assets/...` → Bundle blieb leer).
s.resource_bundles = {
'RebreakProtectionResources' => ['../../../assets/protection/gambling-domains.json']
'RebreakProtectionResources' => ['gambling-domains.json']
}
end

View File

@ -60,9 +60,11 @@ function withMainAppEntitlements(config) {
cfg.modResults['com.apple.developer.networking.networkextension'] = [
'url-filter-provider',
];
// Family Controls: Distribution-Entitlement — nur wenn das Env-Flag gesetzt
// ist (development-Builds bzw. nach Apple-Freigabe auch preview/production).
if (process.env.REBREAK_ENABLE_FAMILY_CONTROLS === '1') {
// Family Controls = Kern-Funktion, Apple-Distribution-Entitlement freigegeben
// (v0.3.4) → DEFAULT AN. Nur ein explizites REBREAK_ENABLE_FAMILY_CONTROLS=0
// schaltet es ab (Escape-Hatch). Muss identisch zu app.config.ts
// `familyControlsEnabled` bleiben.
if (process.env.REBREAK_ENABLE_FAMILY_CONTROLS !== '0') {
cfg.modResults['com.apple.developer.family-controls'] = true;
}
const groups = cfg.modResults['com.apple.security.application-groups'] || [];