diff --git a/apps/rebreak-native/app.config.ts b/apps/rebreak-native/app.config.ts index cd35117..11af878 100644 --- a/apps/rebreak-native/app.config.ts +++ b/apps/rebreak-native/app.config.ts @@ -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`. diff --git a/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtection.podspec b/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtection.podspec index d995fb4..37fef4b 100644 --- a/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtection.podspec +++ b/apps/rebreak-native/modules/rebreak-protection/ios/RebreakProtection.podspec @@ -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 diff --git a/apps/rebreak-native/assets/protection/gambling-domains.json b/apps/rebreak-native/modules/rebreak-protection/ios/gambling-domains.json similarity index 100% rename from apps/rebreak-native/assets/protection/gambling-domains.json rename to apps/rebreak-native/modules/rebreak-protection/ios/gambling-domains.json diff --git a/apps/rebreak-native/plugins/with-rebreak-protection-ios.js b/apps/rebreak-native/plugins/with-rebreak-protection-ios.js index eb425c5..7d1ebdd 100644 --- a/apps/rebreak-native/plugins/with-rebreak-protection-ios.js +++ b/apps/rebreak-native/plugins/with-rebreak-protection-ios.js @@ -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'] || [];