native-module

I can't see any iOS Native Module in JS

白昼怎懂夜的黑 提交于 2020-01-14 18:44:10
问题 I have some experience with React but I'm new to React Native. I've played around for a while, but I got stuck when I tried to write a basic native module for iOS. I've tried with both Swift and Objective C. (I have some basic experience with Swift, but Objective C is completely new for me) Some context: The project is created with react-native-cli 2.0.1 I use XCode 9.1 Here is the .swift class import Foundation @objc(Something) class Something: NSObject { @objc func printSomething() -> Void

EXC_BAD_ACCESS when get value of static NSString varible in class inheritit RCTEventEmitter

▼魔方 西西 提交于 2019-12-11 14:13:00
问题 I am building react native using native module. In the javascript side, I want to create native module on iOS for listener event and call some method from javascript side. I have a static NSDictionary variable in Objective C. But when I get value of variable, it show EXC_BAD_ACCESS. I am building react native using native module. In the javascript side, I want to create native module on iOS for listener event and call some method from javascript side. Here is my code DeepLinkController.js

React Native Get battery status / level Using Native Modules

陌路散爱 提交于 2019-12-04 20:02:56
问题 I am writing a react native app to get IOS and Android Battery status. I search through the net and found few libraries which can get battery level of the phone. https://github.com/robinpowered/react-native-device-battery https://github.com/remobile/react-native-battery-status https://github.com/oojr/react-native-battery Every library has issues when I try that and not much support for the developer when ask a question on git hub. Can any one provide me better solution or library to get

React Native Get battery status / level Using Native Modules

蹲街弑〆低调 提交于 2019-12-03 13:10:02
I am writing a react native app to get IOS and Android Battery status. I search through the net and found few libraries which can get battery level of the phone. https://github.com/robinpowered/react-native-device-battery https://github.com/remobile/react-native-battery-status https://github.com/oojr/react-native-battery Every library has issues when I try that and not much support for the developer when ask a question on git hub. Can any one provide me better solution or library to get Battery status of IOS and Android. Thanks in advance Sameera Chathuranga I wrote my own IOS and Android