Skip to content

Commit 018e92c

Browse files
committed
fix(ios): port Xcode 26 ODR workaround from main into podspec
1 parent a5a7f01 commit 018e92c

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

RNRive.podspec

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ else
3838
Pod::UI.puts "@rive-app/react-native: Using experimental Rive runtime backend"
3939
end
4040

41+
# Xcode 26 workaround: strip .Swift Clang submodule from RiveRuntime's prebuilt
42+
# modulemaps to prevent ODR conflicts with locally-compiled Swift C++ interop.
43+
# See: https://github.com/rive-app/rive-nitro-react-native/issues/173
44+
if defined?(Pod::Installer)
45+
module RiveXcode26SwiftModuleFix
46+
def run_podfile_pre_install_hooks
47+
rive_dir = File.join(sandbox.root.to_s, 'RiveRuntime')
48+
if Dir.exist?(rive_dir)
49+
Dir.glob(File.join(rive_dir, '**', 'module.modulemap')).each do |path|
50+
content = File.read(path)
51+
next unless content.include?('RiveRuntime.Swift')
52+
cleaned = content.gsub(/\nmodule RiveRuntime\.Swift \{[^}]*\}\n?/m, "\n")
53+
File.write(path, cleaned)
54+
end
55+
end
56+
super
57+
end
58+
end
59+
60+
Pod::Installer.prepend(RiveXcode26SwiftModuleFix)
61+
end
62+
4163
Pod::Spec.new do |s|
4264
s.name = "RNRive"
4365
s.version = package["version"]

0 commit comments

Comments
 (0)