Questions tagged [native-module]

105 questions
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 //…
2
votes
0 answers

Electron Crash on calling a native addon which is using window's uiautomation library to detect button in another window

I have a native addon which detect zoom meeting window and find some button in it. That Native addon is made using NAPI(node-addon-api) and when I run it, it works fine...(give me that button name). But when I try to run that native addon in…
2
votes
1 answer

How to provide source map in Nodejs VM

I am evaluating javascript bundled source code in nodejs using the below code const javascriptCode = "..." const javascriptSourceMap = "..." const wrapper = NativeModule.wrap(javascriptCode); const script = new vm.Script(wrapper, { …
ZaidRehman
  • 1,631
  • 2
  • 19
  • 30
2
votes
1 answer

How do I integrate a native module as a dependency in a custom module/library in react native

I created a module/library with react-native-create-library for handling specific ble procedures of a custom device and chose react-native-ble-manager for the native ble functionalities. Since I did not write any native code in my library I'm just…
IzayaMe
  • 21
  • 2
2
votes
1 answer

Building native modules as part of electron app

I am currently working on building out an application using electron, react, typescript, and NodeJS native modules. I started the application using the provided boilerplate code…
slagathor
  • 302
  • 3
  • 12
2
votes
0 answers

Electron 7 fails to build native modules

I'm building an electron app that is running native modules. I upgraded to Electron 7 but since then I'm getting the following error when I'm building the app using electron-forge. I also upgraded my node version to 12.8.1. In order to load native…
Rani
  • 6,424
  • 1
  • 23
  • 31
2
votes
0 answers

Trying to get serial port to work with electron. Getting very long error on electron-rebuild

I am trying to get serialport to work with electron. Serialport is anative module so I have learned you have to recompile it to work with electron. I have completed the steps that several other threads here have said and I am getting this crazy long…
cheesemas46
  • 139
  • 12
2
votes
1 answer

Unable to load some native node js modules with electron 4.0.6 on Windows

I am trying to upgrade my application from electron 1.8.1 to 4.0.6. I am using multiple native node js modules. They all compile successfully (or prebuilt binaries are available). I am getting following error when requiring one of the…
2
votes
1 answer

How to add default value of Native Bridge Android in React Native

I have some service that need to start repeatedly by user input or given default value, so i need to add parameter to handle it, I have tried this: @ReactMethod public void start(){ start(1000); } @ReactMethod public void start(int timer){ …
flix
  • 1,688
  • 3
  • 34
  • 64
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…
2
votes
1 answer

How to configure Info.plist file in ejected react-native app uses expo sdk

i created an app using react-native ini projectName and i added a native module package called react-native-facebook-account-kit And i need to change Info.plist in ios folder and add app id and client token info. Also i created a pod file as…
Nezih
  • 381
  • 6
  • 19
2
votes
2 answers

Build native modules with electron-builder for different OS

I'm creating an app using electron and nodejs, when I try to build it with electron-builder using following command: electron-builder --mac --linux --win --x64 it builds native modules only for my current os. Is there a way to build native modules…
StackedQ
  • 3,999
  • 1
  • 27
  • 41
2
votes
3 answers

React Native NativeModules Empty Object

Trying to create my first npm module in order to determine if a user is on the phone. It's for a React Native app. No matter what I try, the module returns undefined. NativeModules always appears to be an empty object. Please help! Below is a link…
Tori Huang
  • 527
  • 1
  • 7
  • 25
2
votes
1 answer

How to access dimensions from android and apply it to style in react native

I am developing a hybrid app react native + Android. I want consistent font size throughout the app. So I want to access the font size declared in dimen.xml of Android, where I have created stubs for different dimensions of different devices. I can…
Raj Suvariya
  • 1,592
  • 3
  • 14
  • 36
2
votes
2 answers

react-native : Native modules with same name for both android and iOS

I'm trying to build a react-native wrapper around our existing native android and ios SDK. I want to know if I can use the same class name and class methods for both the Android and iOS bridge modules? And how do I map the right module to be called…
abysmalpro
  • 45
  • 8