Skip to content

fix: use custom modulemap to prevent Xcode 26 ODR errors with CocoaPods#428

Open
mfazekas wants to merge 1 commit intorive-app:mainfrom
mfazekas:mfazekas/fix-cocoapods-xcode26-odr
Open

fix: use custom modulemap to prevent Xcode 26 ODR errors with CocoaPods#428
mfazekas wants to merge 1 commit intorive-app:mainfrom
mfazekas:mfazekas/fix-cocoapods-xcode26-odr

Conversation

@mfazekas
Copy link
Contributor

@mfazekas mfazekas commented Mar 6, 2026

Summary

The auto-generated modulemap includes a module RiveRuntime.Swift Clang submodule that references RiveRuntime-Swift.h. This header bakes in Swift stdlib C++ interop type definitions for the exact Swift version used to build the XCFramework. When CocoaPods consumers use a different Xcode/Swift version (e.g. Swift 6.2 in Xcode 26 vs Swift 6.1), the differing definitions cause hard ODR errors that cannot be suppressed. SPM is unaffected since it uses .swiftinterface files directly.

This PR adds a custom modulemap without the .Swift submodule and sets MODULEMAP_FILE in the base xcconfig so Xcode uses it during builds. The -Swift.h header still ships in the framework for direct #import use.

See rive-app/rive-nitro-react-native#174

The auto-generated modulemap includes a .Swift Clang submodule referencing
RiveRuntime-Swift.h, which bakes in Swift stdlib C++ interop definitions for
the exact Swift version used to build. When CocoaPods consumers use a different
Xcode/Swift version, the differing type definitions cause hard ODR errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant