Skip to content

Fix ImageRequestParams.h not found in ReactCodegen with static frameworks - #60225

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
@nishan/fix-reactcodegen-imagemanager-static-frameworks
Nov 23, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
@nishan/fix-reactcodegen-imagemanager-static-frameworks

Conversation

@intergalacticspacehighway

@intergalacticspacehighway intergalacticspacehighway commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary:

Since 0.89.0-rc.0, the iOS build fails with static frameworks when React Native is built from source and a codegen spec has an ImageSource prop. @react-native-community/slider, react-native-svg, and react-native-screens all hit this.

React_Fabric.framework/Headers/react/renderer/imagemanager/ImageManager.h:17:10:
fatal error: 'react/renderer/imagemanager/ImageRequestParams.h' file not found

Regressed by #58730, which made codegen emit umbrella includes. Generated Props.h now includes <React/ImageManager.h>. That umbrella includes ImageManager.h, which needs ImageRequestParams.h from React_ImageManager.framework. The ReactCodegen pod has no header search path for that framework. Library pods already get it from new_architecture.rb.

This change adds React-ImageManager to the ReactCodegen framework header search paths. The prebuilt core is not affected.

Changelog:

[IOS] [FIXED] - Fix ImageRequestParams.h not found in codegen with static frameworks

Test Plan:

Repro: https://github.com/intergalacticspacehighway/rn-static-frameworks-imagesource-repro (RN CLI app on 0.89.0-rc.2 with @react-native-community/slider@5.2.2).

USE_FRAMEWORKS=static RCT_USE_RN_DEP=0 RCT_USE_PREBUILT_RNCORE=0 bundle exec pod install
xcodebuild -workspace SliderRepro.xcworkspace -scheme SliderRepro \
  -configuration Release -sdk iphonesimulator -derivedDataPath build
  • Without this change: BUILD FAILED with the error above.
  • With this line applied to the 0.89.0-rc.2 template in the repro: BUILD SUCCEEDED. The template on main is the same.
  • jest packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js: 52 passed. The 2 snapshots are updated for the new line.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 23, 2026
@intergalacticspacehighway
intergalacticspacehighway force-pushed the @nishan/fix-reactcodegen-imagemanager-static-frameworks branch from 042d666 to 26ca996 Compare November 23, 2026 08:36
…orks

With `use_frameworks!` and React Native built from source, generated
component code fails to compile when a spec has an `ImageSource` prop.
Generated `Props.h` includes `<React/ImageManager.h>`, which reaches
`ImageRequestParams.h` in `React_ImageManager.framework`. The
`ReactCodegen` pod has no header search path for that framework.
@intergalacticspacehighway
intergalacticspacehighway force-pushed the @nishan/fix-reactcodegen-imagemanager-static-frameworks branch from 26ca996 to 6860cf0 Compare November 23, 2026 08:37
@intergalacticspacehighway
intergalacticspacehighway marked this pull request as ready for review November 23, 2026 08:37
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 23, 2026
@intergalacticspacehighway intergalacticspacehighway added the p: Expo Partner: Expo label Nov 23, 2026
@meta-codesync

meta-codesync Bot commented Nov 23, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D133961066.

@christophpurrer christophpurrer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit a83804d into main Nov 23, 2026
106 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @intergalacticspacehighway in a83804d

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 23, 2026
@gabrieldonadel
gabrieldonadel deleted the @nishan/fix-reactcodegen-imagemanager-static-frameworks branch November 23, 2026 16:33
gabrieldonadel pushed a commit that referenced this pull request Nov 23, 2026
…orks

## Summary:

Since 0.89.0-rc.0, the iOS build fails with static frameworks when React Native is built from source and a codegen spec has an `ImageSource` prop. `@react-native-community/slider`, `react-native-svg`, and `react-native-screens` all hit this.

```
React_Fabric.framework/Headers/react/renderer/imagemanager/ImageManager.h:17:10:
fatal error: 'react/renderer/imagemanager/ImageRequestParams.h' file not found
```

Regressed by #58730, which made codegen emit umbrella includes. Generated `Props.h` now includes `<React/ImageManager.h>`. That umbrella includes `ImageManager.h`, which needs `ImageRequestParams.h` from `React_ImageManager.framework`. The `ReactCodegen` pod has no header search path for that framework. Library pods already get it from `new_architecture.rb`.

This change adds `React-ImageManager` to the `ReactCodegen` framework header search paths. The prebuilt core is not affected.

## Changelog:

[IOS] [FIXED] - Fix `ImageRequestParams.h` not found in codegen with static frameworks

## Test Plan:

Repro: https://github.com/intergalacticspacehighway/rn-static-frameworks-imagesource-repro (RN CLI app on 0.89.0-rc.2 with `@react-native-community/slider@5.2.2`).

```sh
USE_FRAMEWORKS=static RCT_USE_RN_DEP=0 RCT_USE_PREBUILT_RNCORE=0 bundle exec pod install
xcodebuild -workspace SliderRepro.xcworkspace -scheme SliderRepro \
  -configuration Release -sdk iphonesimulator -derivedDataPath build
```

- Without this change: `BUILD FAILED` with the error above.
- With this line applied to the 0.89.0-rc.2 template in the repro: `BUILD SUCCEEDED`. The template on `main` is the same.
- `jest packages/react-native/scripts/codegen/__tests__/generate-artifacts-executor-test.js`: 52 passed. The 2 snapshots are updated for the new line.

Differential Revision: D133961066

Pull Request resolved: #60225

(cherry picked from commit a83804d)
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @intergalacticspacehighway in 051dc36

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants