Integrate ARKit/SceneKit with React Native

I've been working on an app that combines CoreML and ARKit/SceneKit to detect and measure some objects, with success.

Now I need to make it available to a React Native app, and I'm trying this approach here: https://github.com/riteshakya037/react-native-native-module where I can navigate and instantiate the view controller.

The problem occurs when my view gets called. I have errors at the sceneView, not being loaded.

Is there a way to use it without the Storyboard? For now it seems the incompatibility.

Accepted Reply

I got it working. Based on that repo approach, I'm calling the storyboard with no issues

let MyStoryboard = UIStoryboard(name: "MyStoryboard", bundle: Bundle.main)
let modelVC = MyStoryboard.instantiateViewController(withIdentifier: "myIdentifier")
let navController = UINavigationController(rootViewController: modelVC)

You need to set up the identifier ID at the storyboard at its settings, and don't forget to ask the camera permissions before navigating to the native storyboard.

Replies

I got it working. Based on that repo approach, I'm calling the storyboard with no issues

let MyStoryboard = UIStoryboard(name: "MyStoryboard", bundle: Bundle.main)
let modelVC = MyStoryboard.instantiateViewController(withIdentifier: "myIdentifier")
let navController = UINavigationController(rootViewController: modelVC)

You need to set up the identifier ID at the storyboard at its settings, and don't forget to ask the camera permissions before navigating to the native storyboard.