Skip to content

Commit c534ed6

Browse files
authored
Merge pull request #242 from Resgrid/develop
RU-T50 Build fix
2 parents 02b6516 + 24c6ea3 commit c534ed6

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

plugins/withWebRTCFrameworkFix.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
1417
const 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

Comments
 (0)