Questions tagged [react-native-modules]

41 questions
4
votes
0 answers

How to combine different react native bundles in existing native app

I am working on an existing native app where three different partner companies are working so three different react-native modules. Here the problem is when they are creating a javascript bundle, it includes javascript core also in each bundle that…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
3
votes
2 answers

Swift NativeModule for iOS is always null

I am building a mobile application using ReactNative for both IOS and Android. I am also building a native module for iOS using Swift. But when I access the module class from JS, it is always returning null. I created a WaterRowerBleManager.swift…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
3
votes
0 answers

Only audio audible no video seen while playing media through android media player in react native Native-modules

I am trying to use native modules on react native and I want to play a video that has been prepared(mediaplayer.prepare()) in an android native mediaplayer . The mediaplayer is then added to a surface view and the surface view is added to the Adview…
2
votes
0 answers

React Native {NativeModules} not importing on M1/Silicon mac - returning empty object {}

I am attempted to create a React-native 'Native Module' (BankedSdk) in a project developed on an M1 Macbook. - However any attempt to initialise the module returns an empty object. This is the example (2020) repo that works on my intel machine ✅:…
2
votes
1 answer

Pass onPictureInPictureModeChanged result into a react native module

I am trying to do some picture in picture mode using react-native. I wrote a react module I need to generate something similar to this but inside the react native module public class MainActivity extends AppCompatActivity { private PlayerView…
2
votes
1 answer

RN module in Swift can not get param

I am implementing my own module and I have a problem with passing params into function in swift. That function should return Promise. And it always crashes with this error Exception 'getPassesOf: is not a recognized Objective-C method.' was thrown…
Lukáš Šálek
  • 1,265
  • 2
  • 19
  • 38
2
votes
0 answers

NativeModules.CallDetectionManagerAndroid is null

I try to use the package "react-native-call-detection" in my react-native project. But I got a problem. CallDetectorManager does not start listening to incoming calls. And i found the problem…
2
votes
0 answers

React Native module with Swift UIView and .xib file

I am building a custom RN module where I want to expose Swift UIViews from my library to others to use in their RN app. I have a basic example working with a Swift UIView class showing up in my RN module example app: @objc(TestViewManager) class…
mutable2112
  • 439
  • 4
  • 15
2
votes
2 answers

GetElementById equivalent in React Native

I am working on creating a module for React-Native. The module needs to highlight or point out certain elements on the screen based on configuration stored in a DB. In Android, our database would consist of view ids and our code would highlight…
mvinayakam
  • 2,808
  • 2
  • 18
  • 20
1
vote
0 answers

Emit event from other class than native module class from android to react-native

i have CameraModule.kt which is android native module and CameraHomeFragment in a react-native app. And i need to send some data from the fragment to react-native CameraModule.kt : class CameraModule(reactContext: ReactApplicationContext):…
1
vote
0 answers

React native module Linking issue of packages

I have created a native-module named MyNativeModule. in which i have added a package named react-native-scrypt as a dependency. When i install MyNativeModule in MyApp then while using the package internally inside MyNativeModule using some function…
1
vote
1 answer

How to access ReactContextBaseJavaModule from both, a react native file (*.js) and a Kotlin class (*.kt)?

I am new to React Native and working on an application which stores local data using Android SharedPreferences. I currently have SharedPreferences setup as ReactContextBaseJavaModule and am able to access all methods through @ReactMethod annotation…
1
vote
0 answers

new Thread and React Native. Add Mapsforge library

Try to add library mapsforge as module to React Native for generating bmp tiles. But have problem with render of map. Render tiles runing from new Thread If i understand correct, this shouldn't work since RN blocked all threads for self…
1
vote
0 answers

"_ setUrl: unrecognized selector sent to instance" setting the url property to the Swift Publisher

I want to set the url variable that Published in Swift Error: 2022-12-15 21:55:27.837982+0100 WebviewIosExample[23481:8227336] [native] Error setting property 'url' of WebView with tag #7: Exception thrown while executing UI block:…
Amir
  • 349
  • 3
  • 4
1
vote
0 answers

How to import a local react native library that contains native Android and iOS code

I used create-react-library to create a library that contains both native Android and iOS code. This library is not published and I want to use it in another react native project. So I copied the library into the project and tried to reference using…
Wei Wen
  • 133
  • 1
  • 9
1
2 3