@@ -4,12 +4,15 @@ const path = require('path');
44
55/**
66 * Config plugin that patches the Podfile to allow non-modular header includes
7- * inside the livekit_react_native_webrtc framework module .
7+ * inside framework modules for all pod targets .
88 *
9- * Fixes Xcode 26+ build error:
10- * include of non-modular header inside framework module
11- * 'livekit_react_native_webrtc.WebRTCModule'
9+ * Fixes Xcode 26+ build errors like:
10+ * include of non-modular header inside framework module 'RNFBApp.RNFBAppModule'
1211 * [-Werror,-Wnon-modular-include-in-framework-module]
12+ *
13+ * Several pods (livekit-react-native-webrtc, @react-native-firebase, etc.)
14+ * import React Native headers inside their framework modules, which Xcode 26
15+ * treats as an error. This relaxes that check for all pod targets.
1316 */
1417const withWebRTCFrameworkFix = ( config ) => {
1518 return withDangerousMod ( config , [
@@ -24,12 +27,13 @@ const withWebRTCFrameworkFix = (config) => {
2427 }
2528
2629 const hook = `
27- # Fix non-modular header includes in livekit-react-native-webrtc for Xcode 26+
30+ # Fix non-modular header includes for Xcode 26+
31+ # Pods like livekit-react-native-webrtc and @react-native-firebase import
32+ # React Native headers inside their framework modules, which Xcode 26
33+ # treats as an error (-Werror,-Wnon-modular-include-in-framework-module).
2834 installer.pods_project.targets.each do |target|
29- if target.name == 'livekit_react_native_webrtc'
30- target.build_configurations.each do |config|
31- config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
32- end
35+ target.build_configurations.each do |config|
36+ config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
3337 end
3438 end` ;
3539
0 commit comments