diff --git a/plugins/withWebRTCFrameworkFix.js b/plugins/withWebRTCFrameworkFix.js index fb74668..be2645b 100644 --- a/plugins/withWebRTCFrameworkFix.js +++ b/plugins/withWebRTCFrameworkFix.js @@ -4,12 +4,15 @@ const path = require('path'); /** * Config plugin that patches the Podfile to allow non-modular header includes - * inside the livekit_react_native_webrtc framework module. + * inside framework modules for all pod targets. * - * Fixes Xcode 26+ build error: - * include of non-modular header inside framework module - * 'livekit_react_native_webrtc.WebRTCModule' + * Fixes Xcode 26+ build errors like: + * include of non-modular header inside framework module 'RNFBApp.RNFBAppModule' * [-Werror,-Wnon-modular-include-in-framework-module] + * + * Several pods (livekit-react-native-webrtc, @react-native-firebase, etc.) + * import React Native headers inside their framework modules, which Xcode 26 + * treats as an error. This relaxes that check for all pod targets. */ const withWebRTCFrameworkFix = (config) => { return withDangerousMod(config, [ @@ -24,12 +27,13 @@ const withWebRTCFrameworkFix = (config) => { } const hook = ` - # Fix non-modular header includes in livekit-react-native-webrtc for Xcode 26+ + # Fix non-modular header includes for Xcode 26+ + # Pods like livekit-react-native-webrtc and @react-native-firebase import + # React Native headers inside their framework modules, which Xcode 26 + # treats as an error (-Werror,-Wnon-modular-include-in-framework-module). installer.pods_project.targets.each do |target| - if target.name == 'livekit_react_native_webrtc' - target.build_configurations.each do |config| - config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' - end + target.build_configurations.each do |config| + config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' end end`;