Skip to content

Compilation Error on iOS with Fabric and useFrameworks: 'static' #371

@davidjbng

Description

@davidjbng

Description

I get the following compilation error in my expo project

Compiling react-native-keyboard-controller Pods/react-native-keyboard-controller » KeyboardControllerView.mm

❌  (/Users/dj/Library/Developer/Xcode/DerivedData/rnkcrepro-fpszcknsvsireefsykksjmdcqkiw/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/core/PropsParserContext.h:13:10)

  11 | 
  12 | #include <react/renderer/core/ReactPrimitives.h>
> 13 | #include <react/utils/ContextContainer.h>
     |          ^ 'react/utils/ContextContainer.h' file not found
  14 | 
  15 | namespace facebook::react {
  16 | 

The issue is caused by setting useFrameworks in app.json

"expo-build-properties",
{
  "ios": {
+ 	"useFrameworks": "static",
    "newArchEnabled": true
  },

Repo for reproducing

https://github.com/davidjbng/rnkc-repro

To Reproduce

Steps to reproduce the behavior:

npm i
npm run ios

Expected behavior

Compilation works with useFrameworks: 'static'

Version Infos

  • MacOS 14.3.1
  • XCode: 15.2
  • Only fails on iOS
  • RN architecture: Fabric
  • Library version: 1.11.1
    "expo": "^50.0.8",
    "expo-build-properties": "~0.11.0",
    "react": "18.2.0",
    "react-native": "0.73.4",
    "react-native-keyboard-controller": "^1.11.1"

Additional Context

Setting useFrameworks to static is required by React Native Firebase

Metadata

Metadata

Assignees

Labels

build error ❌Anything that triggers build errors and prevent this library from being used🍎 iOSiOS specific🏭 fabricChanges specific to new (fabric/jsi) architecture🐛 bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions