Skip to content

fix(expo): make native feature config reversible - #5076

Open
OskarEichler wants to merge 2 commits into
TheWidlarzGroup:support/6.x.xfrom
OskarEichler:codex/make-expo-config-reversible
Open

fix(expo): make native feature config reversible#5076
OskarEichler wants to merge 2 commits into
TheWidlarzGroup:support/6.x.xfrom
OskarEichler:codex/make-expo-config-reversible

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 31, 2026

Copy link
Copy Markdown

Fixes

  • run boolean Expo mods for both enabled and disabled values, so removing/turning off a setting reverses generated native configuration
  • remove stale notification-service and PiP manifest entries when disabled
  • remove only the audio background mode while preserving unrelated modes
  • let generated Podfile flags update from true to false (or back) while continuing to preserve manual untagged definitions
  • honor the boolean value of iOS ads/caching globals instead of enabling any merely defined variable
  • compose ads and caching Swift flags so enabling both extensions does not overwrite one feature
  • remove every duplicate playback-service entry before optionally adding the canonical service

Previously most mods ran only for truthy props. A prebuilt project could retain notification controls, PiP, background audio, ads, or caching after the corresponding option was disabled. Generated Podfile values were also mistaken for manual definitions and never updated. At the podspec boundary, a defined false still enabled a feature, while enabling both optional iOS extensions retained only the last Swift flag.

Regression coverage

The v6 branch has no test suite (yarn test reports no test available), so there is no config-plugin harness to extend. Verified with:

  • a focused generated-Podfile fixture proving false is inserted and then replaced by true
  • rbenv exec ruby -c react-native-video.podspec
  • YARN_NODE_LINKER=node-modules yarn prettier --check on all changed TypeScript files
  • YARN_NODE_LINKER=node-modules yarn build
  • YARN_NODE_LINKER=node-modules yarn lint
  • git diff --check

Breaking changes

Disabled/default-false plugin options now actively remove configuration previously generated by this plugin. A manually defined false iOS feature flag now correctly disables that feature. Manual untagged Podfile definitions remain untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant