NeedleXRSession.isARSupported() doesn't fire for iOS ipad pro with arkit support

Same as title, I was using NeedleXRSession.isARSupported() to detect AR support which works fine for android devices with support but not on iOS. Is this broken now or should I be using a different check?

Hi Robyer1,

Currently, NeedleXRSession’s isARSupported() may not work correctly on iOS devices due to limitations with WebXR support. Apple doesn’t support WebXR natively on iOS browsers, which affects the availability of AR features. Instead, consider using Needle Engine’s Everywhere Actions, specifically designed to manage AR interactions on iOS devices. These actions allow you to create experiences that provide similar functionalities to AR without relying on full WebXR support (see %xr.md) (see %xr.md).

You may also explore utilizing the AR.js or other libraries that offer AR capabilities through different methods, like requesting camera images and performing custom algorithms for device pose detection (see %xr.md).

If you’re experiencing persistent issues, it may be beneficial to check if there are any required permissions not granted or if you are accessing it via a secure connection (HTTPS) (see the documentation) (see %xr.md).

For specific implementation details or further assistance, please let me know.

3 replies left
thread_Fa2tIRUA4HpfinXVZ5Z3OD9i
Reply to this message to continue the conversation

Hi, as the bot said correctly: Apple doesn’t support immersive-ar (yet…) and isARSupported does check whether immersive-ar is available.

For iOS devices you want to do something like this:

        if (isiOS()) {
            // need to check for ar support here because on iOS Mozilla XR Viewer **does** support immersive-ar
            NeedleXRSession.isARSupported().then(hasARSupport=> {
               if(hasARSupport == false) { /** you're on iOS without immersive-ar so you need to use the quicklook exporter */ }
            }
        }

We’ll probably add a core method for this in a future version

1 Like

Thanks I used this solution you added :slight_smile:

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.