Skip to content

fix: iOS build on react-native 0.87 (namespaced header imports) - #44

Merged
satya164 merged 3 commits into
callstack:mainfrom
eduardoborges:fix/rn-087-header-imports
Aug 18, 2026
Merged

fix: iOS build on react-native 0.87 (namespaced header imports)#44
satya164 merged 3 commits into
callstack:mainfrom
eduardoborges:fix/rn-087-header-imports

Conversation

@eduardoborges

@eduardoborges eduardoborges commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

React Native 0.87 removed the legacy bridge, and with it the header search paths that made quoted imports like #import "RCTFabricComponentsPlugins.h" resolve. On 0.87 the iOS build fails in LiquidGlassView.mm and LiquidGlassContainerView.mm.

This switches the three affected imports to their namespaced form:

  • "RCTFabricComponentsPlugins.h"<React/RCTFabricComponentsPlugins.h> (both files)
  • "RCTConversions.h"<React/RCTConversions.h>
  • "RCTImagePrimitivesConversions.h"<react/renderer/imagemanager/RCTImagePrimitivesConversions.h> (where the header lives)

We've been carrying this change as a pnpm patch on 0.8.0 since upgrading our app to react-native 0.87.0. The build passes and the glass views render as before.

All three namespaced paths resolve on the whole supported range, not just 0.87: React-ImageManager.podspec has shipped header_dir "react/renderer/imagemanager" since at least react-native 0.80, so no version guard is needed. What 0.87 removed was only the search paths that made the quoted form work.

React Native 0.87 removed the legacy bridge header search paths, so the
quoted imports in LiquidGlassView.mm and LiquidGlassContainerView.mm no
longer resolve. RCTImagePrimitivesConversions.h also moved under
react/renderer/imagemanager. Switch all three to namespaced imports.
Copilot AI lite review requested due to automatic review settings August 15, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates iOS native Objective‑C++ sources to build on React Native 0.87+ by switching legacy quoted React header imports to namespaced/module-style imports (and accounting for one header relocation).

Changes:

  • Switched RCTFabricComponentsPlugins.h imports to <React/...> in both iOS view implementations.
  • Switched RCTConversions.h to <React/...> in LiquidGlassView.mm.
  • Updated RCTImagePrimitivesConversions.h include to the React Native 0.87+ location under react/renderer/imagemanager.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ios/LiquidGlassView.mm Updates React Native header imports (including the relocated image primitives conversions header).
ios/LiquidGlassContainerView.mm Updates React Native Fabric plugins header import to namespaced form.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ios/LiquidGlassView.mm
The header only moved to react/renderer/imagemanager in react-native
0.87, and the README supports 0.80+. Guard the new path with
__has_include and fall back to the old quoted import.
@WynnLin

WynnLin commented Aug 17, 2026

Copy link
Copy Markdown

when do this pr can be merged? I am at react-native@0.87, and the app keeps crash when i use liquid glass component @eduardoborges

@eduardoborges

Copy link
Copy Markdown
Contributor Author

@WynnLin merging is up to the maintainers, but you don't need to wait for it. We've had this change running in our app as a package patch since we moved to 0.87:

  1. pnpm patch @callstack/liquid-glass (on npm/yarn, edit the files under node_modules and run npx patch-package @callstack/liquid-glass instead)
  2. In ios/LiquidGlassView.mm, replace the three quoted imports with:
#import <react/renderer/imagemanager/RCTImagePrimitivesConversions.h>

#import <React/RCTFabricComponentsPlugins.h>
#import <React/RCTConversions.h>
  1. In ios/LiquidGlassContainerView.mm, replace #import "RCTFabricComponentsPlugins.h" with #import <React/RCTFabricComponentsPlugins.h>
  2. pnpm patch-commit <folder pnpm printed>, then run pod install again.

You can also grab the diff straight from this PR: https://github.com/callstack/liquid-glass/pull/44.diff

One heads-up: for us, stock 0.8.0 on react-native 0.87 fails at build time with missing headers. If your app builds fine and only crashes at runtime, you're probably hitting something else and this patch won't help.

@satya164 satya164 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for the PR. i have one comment. will merge after it's addressed

Comment thread ios/LiquidGlassView.mm Outdated
Comment on lines +7 to +12
#if __has_include(<react/renderer/imagemanager/RCTImagePrimitivesConversions.h>)
// react-native 0.87+
#import <react/renderer/imagemanager/RCTImagePrimitivesConversions.h>
#else
#import "RCTImagePrimitivesConversions.h"
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this actually necessary for older react native versions?
lets remove the conditional unless necessary.

@eduardoborges eduardoborges Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call, it isnt needed. I double checked React-ImageManager.podspec has shipped header_dir "react/renderer/imagemanager" since at least react-native 0.80, so the namespaced import resolves on the whole supported range. What 0.87 removed was only the search paths that made the quoted form work.

…0.80

React-ImageManager.podspec has header_dir react/renderer/imagemanager
back to react-native 0.80, so the namespaced import resolves on the
whole supported range and the conditional was dead weight.

@satya164 satya164 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you

@satya164
satya164 merged commit c297cd5 into callstack:main Aug 18, 2026
4 of 6 checks passed
@eduardoborges
eduardoborges deleted the fix/rn-087-header-imports branch August 20, 2026 02:57
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.

4 participants