Questions tagged [react-native-turbomodule]

19 questions
6
votes
1 answer

Error: While resolving module, the Haste package was found. the module could not be found within the package

I am trying the new arch of react native. I have enabled it in my gradle.properties file. This error is for android only and I have not tried iOS yet. I am following the exact sample of Calculator mentioned over here. I get an error saying error:…
5
votes
2 answers

How to use Swift in React Native Turbo Modules

I followed the guide here to create a turbo module. This was fine. https://reactnative.dev/docs/the-new-architecture/pillars-turbomodules I want to use Swift code in this turbo module. I tried adding a Swift file with this code and modifying the…
5
votes
1 answer

Write React Native "Turbo Module" in Rust

React Native recently introduced experimental support for Turbo Modules, which allow developers to write code in C++ and call it directly from Javascript. Is it possible to write a Turbo Module in Rust instead of C++? Generally Rust has good…
justinmoon
  • 443
  • 5
  • 11
4
votes
0 answers

Creating a TurboModule in the app causes it to be undefined in react native's new architecture

I am trying to create a TurboModule for my app. I don't want to create it as a separate module as mentioned over here. I want it to be part of my app So I created a RTNCalculator folder inside that a js folder and created NativeCalculator.ts file.…
3
votes
1 answer

How to emit event in a Turbo Module on iOS

I'm following the guide here to create a Turbo Module in React Native. https://reactnative.dev/docs/next/the-new-architecture/pillars-turbomodules How do you emit events on iOS? The documentation only shows how to call a native function from React,…
Berry Blue
  • 15,330
  • 18
  • 62
  • 113
2
votes
0 answers

Compatibility of Legacy React Native Modules with New TurboModule Architecture

I am currently assessing the compatibility of older React Native modules with the new TurboModule architecture. Despite these modules not officially supporting TurboModule, I have attempted to build my application and it appears that both the legacy…
simone989
  • 397
  • 1
  • 3
  • 8
2
votes
2 answers

How to use registerForActivityResult with TurboModules in react native's new architecture?

Firstly I am not talking about the old architecture and I have already gone through this This method does not really works for new architecture given how the files are structured registerForActivityResult can only be used in MainActivity. I need…
2
votes
2 answers

Add external C++ libraries to react native Turbo app

I am trying out the new react-native Turbo feature. The calls to the cpp code works as the documentation mentions. Is there a way to add external C++ libraries like cryptopp. I have my github repo here RNTurbo.
wahid_abdul
  • 156
  • 2
  • 9
1
vote
0 answers

How do I intigrade C++ code with React Native JSI

I want to use C++ code to write algorithms in both android & ios apps, can I do it with the help of react native JSI what is the step by step process of integrating C++ Code in my React Native Project
1
vote
0 answers

Cannot install CocoaPods in React Native Turbo Module on Mac OS X

I'm trying to install Cocoapods in a React Native Turbo Module. > RCT_NEW_ARCH_ENABLED=1 bundle exec pod install Could not find cocoapods-1.11.3, cocoapods-core-1.11.3, algoliasearch-1.27.5, typhoeus-1.4.0, json-2.6.2, ethon-0.15.0, ffi-1.15.5 in…
Berry Blue
  • 15,330
  • 18
  • 62
  • 113
1
vote
0 answers

React Native Android Build with new architecture enabled taking too long

I have a react native project with newArchitecure enabled (i.e new NativeModule system (TurboModule) and the new Renderer (Fabric)). I tried to build this project in Azure DevOps pipeline using gradle build for generating android .apk. But the Build…
1
vote
1 answer

How to avoid setting manual UIView width and height on native side for Fabric component when using CAGradientLayer?

I am trying to create a fabric module for iOS using react-native's new architecture In my objective-c++ file while setting a UIView, I have to assign a CGRect at time of init of UIView. If I don't on the native side and just give it on js side the…
0
votes
1 answer

Use React Native Turbo Module within existing native apps

When using native modules, it was possible to use them within existing native apps without the necessity of creating a new module: There are two ways to write a native module for your React Native application: Directly within your React Native…
flokol120
  • 167
  • 1
  • 2
  • 12
0
votes
0 answers

Turbo Module and Fabric Component, can we share a UIView / Surface View between them?

I have an iOS and Android SDK which is made for classic (XCode/Android Studio) mobile development. In this SDK, we use a Controller to do offscreen things like loading data and other stuff. But we can also create a View or UIView, pass it to the…
0
votes
1 answer

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNPermissionsModule' couldn't be found

I am trying to run the code but this error keeps on showing up: ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNPermissionsModule' could not be found. Verify that a module by this name is registered in the native binary., js…
1
2