# Babylonjs Native xr issue on iOS

**URL:** <https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044>\
**Category:** Questions\
**Tags:** babylon-native, xr, ios\
**Created:** [April 26, 2024, 9:26am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044 "2024-04-26T09:26:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [April 26, 2024, 9:26am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/1 "2024-04-26T09:26:19Z")

</div>

I’m working on a project where we would like to use BabylonJS native to run our WebXR application on iOS devices.

I have the current project running and able to start the playground application. But when I try to start the experience the application crashes. Not sure if this is a bug or something else I experience?

I’m testing on a iPhone Se running iOS 17.4.1. I am able to run WebXR in a app clip from Variant [https://demos.launchar.app](https://demos.launchar.app). Not sure how they solved it, or if they are using BabylonJS Native at all or create their own interface.

```auto
xr.baseExperience.enterXRAsync("immersive-ar", "unbounded", xr.renderTarget).then((xrSessionManager) => {
   console.log("XR started");
});

```

I get XR started message but the screen starts to blink and I get following error:

```auto
BJS - [10:59:03]: session.enabledFeatures is not available on this device. It is possible that this feature is not supported.
XR started
interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
Thread Performance Checker: Thread running at User-interactive quality-of-service class waiting on a thread without a QoS class specified (base priority 31). Investigate ways to avoid priority inversions
PID: 1083, TID: 176361
Backtrace
=================================================================
3 AppleNeuralEngine 0x00000001deff0f34 7A5A59FE-13B5-31AB-B69D-6BB75B5B7CC8 + 28468
4 AppleNeuralEngine 0x00000001df00ea78 7A5A59FE-13B5-31AB-B69D-6BB75B5B7CC8 + 150136
5 Espresso 0x000000019f276d20 C576584B-5370-37C8-B9F2-4D02604F22E0 + 10960160
6 Espresso 0x000000019ed86108 _ZN8Espresso26net_compiler_segment_based9 __forwardERKNSt3__ 110shared_ptrINS_14abstract_batchEEE + 1248
7 Espresso 0x000000019e8affd0 _ZN8Espresso3net9 __forwardERKNSt3__ 110shared_ptrINS_14abstract_batchEEEii + 388
8 Espresso 0x000000019e8af14c C576584B-5370-37C8-B9F2-4D02604F22E0 + 704844
9 Espresso 0x000000019e8ad814 C576584B-5370-37C8-B9F2-4D02604F22E0 + 698388
10 Espresso 0x000000019e8ad5f0 espresso_plan_execute_sync + 132
11 SceneIntelligence 0x00000002099caf18 656443F8-FAF6-3ECA-B452-2108F9B50A2A + 36632
12 SceneIntelligence 0x00000002099d5784 656443F8-FAF6-3ECA-B452-2108F9B50A2A + 79748
13 ARKitCore 0x00000001bf51d7ac F0271512-8F53-3E91-8AE3-A6C6AD3CBF74 + 804780
14 ARKitCore 0x00000001bf5c75cc F0271512-8F53-3E91-8AE3-A6C6AD3CBF74 + 1500620
15 ARKitCore 0x00000001bf5c74bc F0271512-8F53-3E91-8AE3-A6C6AD3CBF74 + 1500348
16 libdispatch.dylib 0x0000000105054b98 _dispatch_call_block_and_release + 32
17 libdispatch.dylib 0x00000001050567bc _dispatch_client_callout + 20
18 libdispatch.dylib 0x000000010505e66c _dispatch_lane_serial_drain + 832
19 libdispatch.dylib 0x000000010505f43c _dispatch_lane_invoke + 460
20 libdispatch.dylib 0x0000000105060abc _dispatch_workloop_invoke + 2336
21 libdispatch.dylib 0x000000010506c404 _dispatch_root_queue_drain_deferred_wlh + 328
22 libdispatch.dylib 0x000000010506ba38 _dispatch_workloop_worker_thread + 444
23 libsystem_pthread.dylib 0x00000001eb5f8f20 _pthread_wqthread + 288
24 libsystem_pthread.dylib 0x00000001eb5f8fc0 start_wqthread + 8

```

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 26, 2024, 3:53pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/2 "2024-04-26T15:53:47Z")

</div>

cc [@BabylonNative](https://forum.babylonjs.com/groups/babylonnative)

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [April 26, 2024, 8:31pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/3 "2024-04-26T20:31:52Z")

</div>

Can you set up a repro in a GitHub repo?

---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 1, 2024, 2:01pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/4 "2024-05-01T14:01:57Z")

</div>

Thanks for reaching out!  
And sorry for the delay, I had some other issues I need to address too.

I just cloned the Babylon Native repository and build it for iOS. I did have some troubles. I managed to run the Native project with help from Cedric:

[Build and run errors in the native playground targeting iOS](https://forum.babylonjs.com/t/build-and-run-errors-in-the-native-playground-targeting-ios/49672)

If I set `ar = true` and run the application on my iPhone Se I get the mention error.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [May 1, 2024, 3:13pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/5 "2024-05-01T15:13:40Z")

</div>



---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [May 10, 2024, 10:38pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/6 "2024-05-10T22:38:05Z")

</div>

Sorry for the delay. There are a lot of issues recently. For tracking purposes, can you [file an issue on GitHub](https://github.com/BabylonJS/BabylonNative/issues)? It is likely we won’t be able to look at this one for a bit. Are you blocked by this?

---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 13, 2024, 1:07pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/7 "2024-05-13T13:07:27Z")

</div>

Thanks for returning 🙂

I will file an issue on GitHub.

I was able to have something running in Babylon React Native. I am able to start the xr experience and able to run the hittest, where I show a marker on the floor. Unfortunate my luck runs out after that. When I try to use the hittest to add an anchor I’m able to get the first sometimes, but after that I keep getting an error in CreateAnchor method:

```auto
Anchor System::Session::Frame::CreateAnchor(Pose pose, NativeTrackablePtr) const {
    return m_impl->sessionImpl.CreateAnchor(pose);
}

```

The exception:

```auto
com.facebook.react.JavaScript (17): EXC_BAD_ACCESS (code=1, address=0x0)

```

I will gladly do what I am able to do, getting this to work 🙂

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [May 13, 2024, 4:46pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/8 "2024-05-13T16:46:11Z")

</div>

I am not expecting Babylon React Native to have issues. Please make sure to mention this in the GitHub issue(s).

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [May 13, 2024, 11:48pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/9 "2024-05-13T23:48:17Z")

</div>



---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 14, 2024, 6:47am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/10 "2024-05-14T06:47:14Z")

</div>

Should I file a new issue on BabylonReactNatives’s GitHub regarding the problem with `CreateAnchor` ?

---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 14, 2024, 7:00am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/11 "2024-05-14T07:00:54Z")

</div>

@bghgary I just tried to run a simple AR Kit app and I got the same exception! I suspect this could be a issue outside Babylon!

I’ll try dig some more into it…

---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 14, 2024, 9:07am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/12 "2024-05-14T09:07:01Z")

</div>

After upgrading xcode to 15.4 I’m able to run the AR Kit sample project.

I tried to rebuild BabylonNative again. I do not get the exception anymore when entering XR, but the camera feed is not shown, and I’m not able to manipulate the cube either. There is still coming logs from the fps counter though…

I also tried to run the React Native app but still get the same exception as mention above.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 14, 2024, 9:20am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/13 "2024-05-14T09:20:30Z")

</div>

I’ll take a closer look this week.

---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 15, 2024, 8:02am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/14 "2024-05-15T08:02:26Z")

</div>

Let me know if I can assist with anything.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 15, 2024, 1:58pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/15 "2024-05-15T13:58:02Z")

</div>

I can repro with latest xcode/iOS on iPhone 11. I’m working on a fix now 🙂

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 16, 2024, 2:19pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/16 "2024-05-16T14:19:29Z")

</div>

problematic commit is [fix: cleanup view controller by okwasniewski · Pull Request #1368 · BabylonJS/BabylonNative · GitHub](https://github.com/BabylonJS/BabylonNative/pull/1368)

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 16, 2024, 3:03pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/17 "2024-05-16T15:03:33Z")

</div>

> <https://github.com/BabylonJS/BabylonNative/pull/1380>
>
> Fix bug introduced with https://github.com/BabylonJS/BabylonNative/pull/1368 
> x…rView.isHidden was not the intended value.
> I've kept the syntax proposed by @okwasniewski
> idk if it's the 'correct' and standard way to do it.
> cc @Allan121
> 
> fixes #1379

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 17, 2024, 9:36am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/18 "2024-05-17T09:36:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)\
**Post date:** [May 17, 2024, 12:10pm UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/19 "2024-05-17T12:10:23Z")

</div>

I just pulled the newest version of BabylonNative and was able to run the WebXR experience on my iPhone.

Great work!

---

<div class="post-metadata">

**Author:** ![ArvindVenkat](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@ArvindVenkat](https://forum.babylonjs.com/u/ArvindVenkat)\
**Post date:** [May 14, 2025, 4:51am UTC](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044/20 "2025-05-14T04:51:55Z")

</div>

Hello @dnrn, I am working in babylonjs and I need some clarification on the compatibility across IOS and android?

Firstly, BabylonJS can work in IOS platform using WebXR?  
Secondly, If yes, Did you build two projects for IOS and android separately?

@Cedric and others, Please don’t mind to throw in your suggestions also.

Thanks

[Next page](https://forum.babylonjs.com/t/babylonjs-native-xr-issue-on-ios/50044.md?page=2)
