In my react native app, i want to integrate one of iOS native library. Here the library has been written for UINavigation stack, so they added a button to go back the app from library.
In native iOS the library has been called like below code:
LibController *lib=[[LibController alloc]initWith:someparametrs];[self.navigationController pushViewController:lib animated:YES];
Here simply i added my previous controller as UINavigation controller using Editor->Embed In->Navigation controller
by this i can easily call the library and able dismiss the library.
The above code is not working React Native app, because we can't get the Navigation stack from react native to native iOS. So far i tried set as rootview controller and called the library but not able to go back the React native.
my code for calling the library :
UINavigationController* nv = [[UINavigationController alloc] initWithRootViewController:lib]; AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; nv.modalPresentationStyle=UIModalPresentationFullScreen; nv.delegate=self; [delegate.window.rootViewController presentViewController:nv animated:YES completion:nil];
This code works fine to call the native library but i can't go back to react native because of setting the Controller as RootViewController.
Help me to add my controller to the react native navigation stack or call my Native iOS library and go back to React native. Thanks in Advance.