Expose Native Objective-C OR Swift module created in react native bridge to the Application's native side #553
-
I have created a new react native library and working on creating a native module for push notification. I want to get the push notification token in my react native bridge from application's AppDelegate.m. Do i need to do anything extra to make this class/module from react-native bridge folder accessible to the react native application's Native code? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Not sure if this helps, but here is another approach, In your Please check how React Native Bootsplash handles it. They follow a similar approach. |
Beta Was this translation helpful? Give feedback.
-
@atlj yes, that is what I am trying to do, sorry, if i was misunderstood. Here is my detailed code and the error i am getting in XCode - RnPushNotification.h
RnPushNotification.m
When I import this method in the ReactNative Example Application's AppDelegate.m file, i am getting File not found error PLEASE NOTE: Currently I am trying to add this function in the example app i got with the Scaffold command. |
Beta Was this translation helpful? Give feedback.
Okay, this time (4th OR 5th time), i removed all node modules in example app, reinstalled node as well as pod packages and now it is able to import. Not sure what was the issue as it did not work last times.
Thank you so much for the quick replies and help though 🙏