fix(ios): re-enable family-controls entitlement for development builds
It was commented out wholesale in 398b7b9 so the App-Store/TestFlight provisioning profile would build (Apple hasn't granted the *Distribution* Family Controls entitlement yet). But that also killed it for the dev-client, so denyAppRemoval / ManagedSettings throws "NSCocoaErrorDomain:4099 — can't talk to the helper app" when you flip the Blocker-page App-Lock. Gate it on REBREAK_ENABLE_FAMILY_CONTROLS, set to "1" in eas.json's development profile (internal distribution → Development entitlement, which we do have). The preview/production profiles stay without it until Apple approves the Distribution entitlement — then add the flag there too + bump buildNumber. NOTE: the next `eas build -p ios --profile development` will re-provision the main app profile to include the entitlement; if Apple turns out NOT to have granted the *Development* one either, that build will fail the same way the TestFlight one did. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a841b32c31
commit
448d64dbd5
@ -8,7 +8,8 @@
|
||||
"developmentClient": true,
|
||||
"distribution": "internal",
|
||||
"env": {
|
||||
"EXPO_PUBLIC_API_URL": "https://staging.rebreak.org"
|
||||
"EXPO_PUBLIC_API_URL": "https://staging.rebreak.org",
|
||||
"REBREAK_ENABLE_FAMILY_CONTROLS": "1"
|
||||
},
|
||||
"ios": {
|
||||
"simulator": false
|
||||
|
||||
@ -47,11 +47,16 @@ function withMainAppEntitlements(config) {
|
||||
cfg.modResults['com.apple.developer.networking.networkextension'] = [
|
||||
'content-filter-provider',
|
||||
];
|
||||
// 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;
|
||||
// Family Controls: das DISTRIBUTION-Entitlement liegt noch bei Apple zur Freigabe
|
||||
// → AppStore/TestFlight-Builds (Profile preview/production) dürfen es NICHT claimen,
|
||||
// sonst kippt EAS' Provisioning ("doesn't support the Family Controls capability").
|
||||
// Für development-Builds (Dev-Entitlement, internal distribution) schalten wir's per
|
||||
// Env-Flag wieder ein (eas.json → development.env.REBREAK_ENABLE_FAMILY_CONTROLS="1"),
|
||||
// damit denyAppRemoval / ManagedSettings im Dev-Client testbar ist. Sobald Apple das
|
||||
// Distribution-Entitlement freigibt: Flag auch in preview/production env setzen + buildNumber bump.
|
||||
if (process.env.REBREAK_ENABLE_FAMILY_CONTROLS === '1') {
|
||||
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];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user