Skip to content

iOS build fails with Expo precompiled modules (EXPO_USE_PRECOMPILED_MODULES=1): 'DatadogSDKReactNative/DatadogSDKReactNative-umbrella.h' file not found in @datadog/mobile-react-native-webview #1302

@vicprz

Description

@vicprz

Describe the bug

Expo SDK 55+ ships a "precompiled modules" mode (EXPO_USE_PRECOMPILED_MODULES=1), which EAS Build now enables by default server-side (rolled out 2026-06-11). In this mode, Expo's autolinking downgrades every pod whose root spec depends on React-Core to a static library, even when the project uses use_frameworks! :linkage => :static.

This breaks the compilation of DatadogSDKReactNativeWebView in two ways:

  1. ios/Sources/RCTDatadogWebViewManager.mm:8 hardcodes a framework-style umbrella import: #import <DatadogSDKReactNative/DatadogSDKReactNative-umbrella.h>
    When DatadogSDKReactNative is built as a static library, no framework umbrella header exists at that path → fatal error: 'DatadogSDKReactNative/DatadogSDKReactNative-umbrella.h' file not found.
  2. RCTDatadogWebView.h includes react-native-webview's RNCWebViewImpl.h, whose #import <React/RCTView.h> resolves against React Native 0.83's prebuilt React.xcframework (used in this mode), whose headers are namespaced React_Core/… rather than React/…fatal error: 'React/RCTView.h' file not found (clang note: did not find header RCTView.h in framework React).

Reproduction steps

  1. Create an Expo SDK 55 app (CNG / managed workflow, RN 0.83.x, use_frameworks! :linkage => :static via "ios.useFrameworks": "static" in expo-build-properties).
  2. Install @datadog/mobile-react-native@3.5.1 and @datadog/mobile-react-native-webview@3.5.1, plus react-native-webview.
  3. Prebuild and build
npx expo prebuild --clean
EXPO_USE_PRECOMPILED_MODULES="1" npx expo run:ios
  1. The DatadogSDKReactNativeWebView pod target fails to compile. Without EXPO_USE_PRECOMPILED_MODULES=1, the same project builds fine.

SDK logs

› Compiling @datadog/mobile-react-native-webview Pods/DatadogSDKReactNativeWebView » RCTDatadogWebViewManager.mm

❌  (node_modules/@datadog/mobile-react-native-webview/ios/Sources/RCTDatadogWebViewManager.mm:8:9)

   6 |
   7 | #import <Foundation/Foundation.h>
>  8 | #import <DatadogSDKReactNative/DatadogSDKReactNative-umbrella.h>
     |         ^ 'DatadogSDKReactNative/DatadogSDKReactNative-umbrella.h' file not found
   9 | #import "RCTDatadogWebViewManager.h"
  10 | #import "RCTDatadogWebView.h"
  11 |

› Compiling @datadog/mobile-react-native-webview Pods/DatadogSDKReactNativeWebView » RCTDatadogWebView.mm

❌  (node_modules/react-native-webview/apple/RNCWebViewImpl.h:8:9)

   6 |  */
   7 |
>  8 | #import <React/RCTView.h>
     |         ^ 'React/RCTView.h' file not found
   9 | #import <React/RCTDefines.h>
  10 | #import <WebKit/WKDataDetectorTypes.h>
  11 | #import <WebKit/WebKit.h>

Expected behavior

Build succeed when EXPO_USE_PRECOMPILED_MODULES='1'.
For now, I have manually set EXPO_USE_PRECOMPILED_MODULES='0'. It works, but build times are longer.

Affected SDK versions

3.5.1

Latest working SDK version

N/A

Did you confirm if the latest SDK version fixes the bug?

Yes

Integration Methods

Yarn

React Native Version

0.83.6

Package.json Contents

  • react-native 0.83.6
  • expo 55.0.26
  • react-native-webview 13.16.0
  • @datadog/mobile-react-native 3.5.1
  • @datadog/mobile-react-native-session-replay 3.5.1
  • @datadog/mobile-react-native-webview 3.5.1
  • @datadog/mobile-react-navigation 3.5.1
  • @datadog/datadog-ci 5.18.0
  • expo-datadog 55.0.0

iOS Setup

No response

Android Setup

No response

Device Information

No response

Other relevant information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions