I want to use Kudan inside an existing React-Native App. You can create your own Native Components in React-Native so I thought I could make a Kudan-component.
In React-Native I have to write a function which returns a UIView, RN can place on the screen. But all tutorials about Kudan tell me to make my UIViewController into an ARCameraViewController which I can't do because of all the other RN-Components.
I tried the following (YTARViewController extends ARCameraViewController):
- (UIView *)view
{
UIViewController* controller = [[YTARViewController alloc] init];
UIView* view = [[ARCameraView alloc] init];
controller.view = view;
return view;
}
But this renders my app unresponsive with 100% CPU usage as soon as I instantiate this component from JS, which will run above code and try to place the view on screen, which doesn't happen, because the app is already unresponsive at this point.