Vr mode can't use in IOS 12.2

I test ios12.1 is ok,when the iphone/ipad version update to 12.2,Gyro is unuseful,the screen can’t move

Jey can you give us more info? Like a repro maybe in the playground?

Pinging @trevordev

https://www.babylonjs-playground.com/#XK2D14#3
you can use this demo in ios 12.2,you can drag screen by hand,but gyro is unuseful,if ios version <12.2,everything is ok

@trevordev @Deltakosh

@1113 yikes it looks like they disabled gyro by default in 12.2 Apple to Limit Accelerometer and Gyroscope Access in Safari on iOS 12.2 for Privacy Reasons - MacRumors
You can turn it on in settings but unfortunately apple doesn’t prompt the user to do this.

If you want to detect if it’s supported you could try something like the following

var supported = false;
window.removeEventListener(“deviceorientation”, ()=>{
supported = true
});
setTimeout(()=>{
if(!supported){
// prompt user that orientation is not supported
}
}, 200)

Safari on IOS 12.2:
https://www.babylonjs-playground.com/#GM1XMV#1
my project in playground,gyro is ok,
but my project in my server,
http://183.3.139.134:8886/
gyro is unuseful,
Safari < IOS12.2:
everything is ok

Gyroscope Access i have been turn it on

Can you confirm that this page is working?

https://www.audero.it/demo/device-orientation-api-demo.html

Knew it! :frowning:

1 Like

Yes,this page is working

Your QA have two way to resolve it,one is use the latest version of babylon,

I do that but it’s unuseful,
two is handle the prompt,but i don’t know how to do it

Ill get my hands on an iphone and create a sample for this case. Here’s the issue I created to track this VR example for iphone after new sensor privacy change · Issue #6395 · BabylonJS/Babylon.js · GitHub thanks for all the info.

my project in babylonjs-playground,gyro is ok,Is it babylonjs-playground do something to make gyro become effective?

Maybe https vs http ???

Yes! Ios 12.2 require https!Thank you!