I’m getting this error when I try to run on iOS:
Building for ‘iOS-simulator’, but linking in object file
(MY_PROJECT_PATH/node_modules/@babylonjs/react-native-iosandroid-0-71/ios/libs/libBabylonNative.a[arm64]2)
built for ‘iOS’
I’m trying to run babylonjs in a react-native app. It works fine on android. Below is my code:
SceneLoader.LoadAsync(MyGLTFLink, undefined, engine).then((loadScene) => {
if (loadScene) {
setScene(loadScene);
// Light
const light = new HemisphericLight("light", new Vector3(0, 1, 0), loadScene);
light.intensity = 0.7;
// Camera
const camera = new ArcRotateCamera("camera", -Math.PI / 2, Math.PI / 2, -6, new Vector3(0, 2, 0), loadScene, true);
setCamera(camera);
} else {
console.error("Error loading loadScene.");
}
}).catch((error) => {
console.error("Error loading scene: ", error);
});
//.... other code
<EngineView camera={camera} displayFrameRate={true} />