Questions tagged [react-native-native-module]
137 questions
2
votes
1 answer
React Native Android Bridge Error: Method addObserver must be called on the main thread
I am using Wootrick SDK for create a bridge to react native. When I'm calling a specific function I'm getting following log and Wootric Survey doesn't show.
java.lang.IllegalStateException: Method addObserver must be called on the main thread
My…

Ruchira Swarnapriya
- 879
- 2
- 11
- 23
2
votes
1 answer
React Native - ios Native Module not working
I'm following the example posted in the official doc for native module ios. I've set up everything, build it and run the application.
// CAL.h
#import
@interface CAL : NSObject
@end
//…

Zephyr
- 1,612
- 2
- 13
- 37
2
votes
1 answer
Why is RPBroadcastPickerView rendering a blank white screen?
Ive created a native iOS module for a react-native (v0.61.5) application. all it does is return the native RPBroadcastPickerView. what i expect is the picker view to be displayed, but only a blank white screen displays in my test.
heres what the…

Jim
- 1,988
- 6
- 34
- 68
2
votes
0 answers
Ios React native Native modules return my module with null
I tried to implement the example of the Native Module for ios, but the module doesn't seem to be registered.
RCTCalendarModule.h
#import
@interface RCTCalendarModule : NSObject…

Jeison Guimarães
- 51
- 4
2
votes
0 answers
How to pass files to native modules and vice versa in react-native?
I want to encrypt/decrypt files in native side using react-native. So I need to pass files such as Images, Videos, docs from javascript side to java code and back from java code to javascript side.
How can I do it ?

Muhammad
- 2,572
- 4
- 24
- 46
2
votes
0 answers
React Native CameraRoll File Upload
I am trying to build a custom image gallery that user can select multiple images from it and upload by FormData but on iOS from CameraRoll library it gets ph://SOMETEXT kinda uri which is a "LocalIdentifier" and its described on this issue…

Erman Sinan Turan
- 145
- 1
- 8
2
votes
1 answer
React Native metro bundler not connecting after install a native dependency on android
After i add this library to my react native project as a native module, my metro bundler wont connect.
https://github.com/FolioReader/FolioReader-Android
react-native 0.61.5
error image

AE0011
- 149
- 7
2
votes
1 answer
Display png image from native module in react native
I have a slider component which I want to have a handle as png image pass as a prop. Now, I want that png image to pass through react native to native modules(android and ios both). The component is written at native side for both ios(Objective C)…

Sourav Yadav
- 21
- 2
2
votes
1 answer
React native native modules with swift getting exported method value as undefined?
I am creating native module using create-react-native-module with swift. After that I have followed react native official documentation for iOS setup.
doc link:: https://facebook.github.io/react-native/docs/native-modules-ios
I have created…

Archana Sharma
- 1,953
- 6
- 33
- 65
2
votes
1 answer
React Native: Is it possible to persist native Java variable values on app reload?
Is it possible to maintain the value of Java variables in a custom react native module when reloading the JS? I would like to maintain components in the below code for debugging purposes. It persists on onHostResume if the app goes into the…

Brien Crean
- 2,599
- 5
- 21
- 46
2
votes
0 answers
can not run native module official example
I followed the document and try to invoke ToastExample.show() from react native.
But it always show
error
My code:
public class CustomToastPackage implements ReactPackage {
@Override
public List…

han yang
- 21
- 1
2
votes
1 answer
Passing iOS objects to React Native
I have a object employeeList which contains objects employee and then each employee object has a person object and address object in it and person and address both contain NSString properties and well as a some function e.g. calculateAge().
I want…

Yahoo
- 4,093
- 17
- 59
- 85
2
votes
0 answers
import Undefined when try import my own module created with nativeModule (IOS - RN)
i created react-native-library for wrap MixPanel SDK but not working in IOS, just work in Android. When try import in android nativemodules can recognize my module "RNMixPanel" but every time when try import from ios the value is undefined.…

Ricardo Bejarano
- 21
- 4
2
votes
1 answer
Can't find Module in NativeModules
I'm trying to implement an iCloudStorage in react-native (0.53.3) with native code.
Right now I have the following:
Header
#import
#import
@interface iCloudStorage : RCTEventEmitter…

TimmNL
- 216
- 2
- 11
2
votes
0 answers
How to access google-services from react-native module for android?
I am following firebase set up tutorial for google sign in with android sdk and am making small react-native module for it available here asq-react-native-google-sign-in
With android implementation, I stumbled upon an issue.
Firebase tutorial…

Ilja
- 44,142
- 92
- 275
- 498