Search code examples
ioscross-browseraugmented-realitymobile-safariwebxr

Is the WebXR api available on mobile iOS browsers or not?


I genuinely couldn't find the answer to this - or rather i am confused because i find conflicting answers. I am soon to write my thesis about a project where web based augmented reality is applied for a business case, and since i'm new to AR in general (but heavy client/server, API and web development experience) i am currently researching the best angles to tackle it. I learned about the WebXR api, but it is stated a lot that this feature is not supported on mobile Safari yet (https://caniuse.com/webxr). Since most (or all) mobile browsers on iOS are just a wrapper for Safari as far as i understand, it seems it is not possible for browsers on iphones. But then i find posts and discussions about the WebXR coming to mobile iOS or already has been released. I'm confused. Is it supported/possible or not?

I understand that Apple consciously decided to keep AR/VR experiences native for a long time, but how do web based AR experiences then work for iOS mobile browsers? Do they have some kind of own mobile browser API for it? Because i have seen web based AR apps for iOS, and even with JS libraries for it - they must be able to access the device APIs somehow. Right?


Solution

  • It depends on the type of AR you need to develop. Marker-based AR, using AR.Js or MindAR, works fine with Safari, if the user grants camera access to Safari. Unfortunately, the WebXR API doesn’t seem to be available yet. There is a WebXR flag on Safari, but enabling it doesn’t appear to change anything, at least based on my tests .

    Apple has announced support for WebXR with their VisionPro, but it’s unclear if this will only be available on the Safari version of the headset, or also for the mobile one.

    The only solution I’ve found so far is to use the Mozilla WebXR viewer here the AppStore link, it doesn't seem to be under active development, but it does work to run WebXR apps made with ThreeJs. This isn’t ideal for user experience, as they need to install another app, but it works as expected.

    Last year, there was news that Apple would allow the installation of non-webkit-based browsers (so also able to run WebXR), but this would still require users to install another app. Fingers cross for Safari finally supporting WebXR.