How to exit from a react component into the native iOS app #22544
Labels
Platform: iOS
iOS applications.
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
I had this requirement of adding a new screen to an old iOS app made with Objective-C. The next thought was to make a react native reusable component and open it from my iOS app.
I used the reference from this page: https://facebook.github.io/react-native/docs/integration-with-existing-apps, to open my react native component.
The point where I am stuck right now is, how to go back to my native app? There's is nothing in the tutorial for that.
Here is my code:
1.) How to present a react native component from iOS app:
2.) How to expose an Objective-C class to React Native. Write the below code in the .m file:
3.) Now how to call dismiss method from React-Native to Objective C file:
Now NativeModules.ViewController will always create a new instance of ViewController. How can I get the actual instance of ViewController, so I can dismiss the react-native component?
The text was updated successfully, but these errors were encountered: