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 to the code. export default RNOnPhoneCall;
in index.js
will only return undefined. How do I link the functions in ios
folder, and export them in index.js
? Heads up, android
is not up to date yet, only ios
.
I was not exporting the method correctly in my iOS file. Here's the solution, along with a link to the final project.
react-native-check-phone-call-status on github