Search code examples
iosaframe

No movement on ios - aframe.io example runs, same(?) code not? What's the different?


Under IOS, the solution no longer reacts to movements.

My solution has worked and now is no longer working.

Also the "hello world" example with the source code of Glitsch (see below) doesn't work anymore, but if you call the example from the a-frame start page (https://aframe.io/examples/showcase/helloworld/), it works.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Hello, WebVR!Test VR</title>
    <meta name="description" content="Test VR">        
    <script src="https://aframe.io/aframe/dist/aframe-master.min.js" ></script>
  </head>
  <body>
    <a-scene background="color: yellow">
      <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E" shadow></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4" shadow></a-plane>
    </a-scene>
  </body>
</html>

What's the difference? What do I have to do to make my solution work under IOS again?


Solution

  • Unfortunately, Chrome (m74+) and Safari (iOS 12.2+) now ship with sensor access disabled by default. The user has to enable manually on settings:

    • chrome://flags/#enable-generic-sensor in Chrome

    • Settings -> Safari -> Motion & Orientation Access in Safari iOS

    Content also must be served over https.

    More info on: https://github.com/aframevr/aframe/issues/3976