fix(ios): two real build blockers — FC entitlement and extension dev team

The EAS error message "Xcode 14 resource bundle signing" was a misleading wrapper.
Pulled the actual Xcode log via the EAS CLI; the real failures were:

  error: Provisioning profile "...AppStore..." doesn't support the Family Controls
         (Development) capability.
  error: Provisioning profile ... doesn't include the com.apple.developer.family-controls
         entitlement.
  error: Signing for "RebreakURLFilter" requires a development team. (in target
         'RebreakURLFilter' from project 'ReBreak')

Two fixes:
1. Family Controls is requested with Apple but not yet granted (Distribution), so
   EAS can't generate an AppStore provisioning profile that includes it → comment
   out the family-controls entitlement claim in withMainAppEntitlements. Re-enable
   once Apple grants the entitlement. The iOS Swift code still imports
   FamilyControls/ManagedSettings (public frameworks, link fine without the
   entitlement); activateFamilyControls would throw at runtime — handled by the
   JS layer's catch. Net: TestFlight build works, iOS App-Lock feature is dormant
   until the entitlement lands.
2. The RebreakURLFilter extension target had no DEVELOPMENT_TEAM set — EAS managed
   credentials only set it on the main app target; sub-targets don't inherit.
   Hardcoded the team ID 84BQ7MTFYK on the extension's build configurations
   (matches eas.json submit.production.ios.appleTeamId).

(The resource-bundle-signing fix from the previous attempt stays — it's
not the cause here but is correct hygiene for static-frameworks builds.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-05-11 23:57:43 +02:00
parent 572766ab88
commit 398b7b9d58

View File

@ -47,7 +47,11 @@ function withMainAppEntitlements(config) {
cfg.modResults['com.apple.developer.networking.networkextension'] = [
'content-filter-provider',
];
cfg.modResults['com.apple.developer.family-controls'] = true;
// TEMP: Family Controls Distribution Entitlement liegt bei Apple zur Freigabe.
// Solange das Antrag nicht durch ist, kann EAS kein AppStore-Provisioning-Profil
// mit FC erstellen → Build-Fehler. Sobald Apple freigibt: Zeile wieder rein
// (oder via Env-Flag) + buildNumber bump.
// cfg.modResults['com.apple.developer.family-controls'] = true;
const groups = cfg.modResults['com.apple.security.application-groups'] || [];
if (!groups.includes(APP_GROUP)) {
cfg.modResults['com.apple.security.application-groups'] = [...groups, APP_GROUP];
@ -149,6 +153,10 @@ function withExtensionTarget(config) {
buildSettingsObj.SWIFT_VERSION = '5.9';
buildSettingsObj.TARGETED_DEVICE_FAMILY = '"1,2"';
buildSettingsObj.CODE_SIGN_STYLE = 'Automatic';
// EAS managed credentials setzen DEVELOPMENT_TEAM nur auf der Main-App.
// Die Extension ist ein eigenes Target → muss expliziten Team-Wert haben,
// sonst: "Signing for 'RebreakURLFilter' requires a development team".
buildSettingsObj.DEVELOPMENT_TEAM = '84BQ7MTFYK';
}
});