-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS module not importable after install #107
Comments
I made a repo where I demo this issue: https://github.com/grisaitis/issue-rn-native-module-import |
Can confirm, same issue happens even without importing any native library. If I try exporting a simple method and import it in another project, it is also undefined. |
you need a podspec file in the root of your project. Here is an example - https://github.com/react-native-community/react-native-webview/blob/master/react-native-webview.podspec |
@grisaitis Did you ever make any progress with this? I've been having the exact same issue on iOS as the lib doesn't export any methods :/ |
I just had to export a dummy function to get my new native module to work/importable
|
@grisaitis I have the same issue, were you able to fix it and how? |
I'm having an issue with importing modules created with this utility.
If I...
npm install
in the folderreact-native install
in my projectimport RNMyLibrary from 'react-native-my-library';
I see that the value for RNMyLibrary is
null
.Am I doing something wrong?
Also, if I modify the Objective C code and add a method to the module, like in the docs example with the iOS calendar API, I get an error that null has no method. Something is weird with my import, and I'm not sure what.
The text was updated successfully, but these errors were encountered: