I use devicemotion event to access gyroscope on Safari since iOS 11.
- On iOS 11 / 12, gyroscope access is open and just need to listen devicemotion event.
- Starting on iOS 12.2, Apple has blocked gyroscope access and you need to activate an option on safari settings
- Since iOS 13, Apple has implemented the "DeviceOrientationEvent.requestPermission" to ask gyroscope access and when user agree, devicemotion event has the key "rotationRate" with alpha / beta / gamma values (before agreed, value is null).
On iOS 13.4 with no code change on my side and on all my projects using this feature, rotationRate is always null even if user agree gyroscope access.
I searched for an official answer from Apple but nothing available.
It looks like a bug but maybe implementation on my side is wrong ?
Good to know on my code :
First, I listen devicemotion event (with rotationRate null), when interface is ready, user clicks on a button, gyroscope access asked and rotationRate has values.
Any ideas ?
PS : sorry for my bad english
Same thing here. It was working before I updated to 13.4.1.
Could something have changed with the way you get permission?