1 Reply
      Latest reply on May 17, 2020 2:14 PM by magnusfelix
      damien_skyboy Level 1 Level 1 (0 points)

        Hello,

         

        I use devicemotion event to access gyroscope on Safari since iOS 11.

         

        History :

        - 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).

         

        Problem :

        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