Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions plugins/withWebRTCFrameworkFix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, [
Expand All @@ -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`;

Expand Down
Loading