Berry Blue
Berry Blue

Reputation: 16482

How to create a Xcode workspace for a Turbo Module in React Native

I'm following the guide here to create a Native Module in React Native. I selected Swift & Kotlin for the language.

https://reactnative.dev/docs/native-modules-setup

I go through the setup, and it creates two projects. One is an example app and the top level is a library project (AwesomeModule.xcodeproj) for the module. When I open up the iOS library project for the Turbo Module in Xcode I get this errors.

'React/RCTBridgeModule.h' file not found

Here is a screenshot of that directory. It just generates a project file without a workspace.

enter image description here

How do I generate a Workspace in this library project so I can run it independently of the example project?

Upvotes: 1

Views: 1183

Answers (1)

Muhammad Numan
Muhammad Numan

Reputation: 25343

for making a library, we don't need to make xcworkspace separately for a library or native modules, for pod support in your library or native modules you can use project_root/project.podspec

I would suggest using react-native-builder-bob for creating native turbo modules with an example folder. it is easy to use

npx create-react-native-library@latest react-native-awesome-library

enter image description here

Upvotes: 3

Related Questions