Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74509

QMagnetometer doesn't seem to work on iOS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: 5.12.2, 5.13.0 Alpha 1
    • Fix Version/s: 5.15.5, 6.2.0 Beta4
    • Component/s: Sensors
    • Labels:
      None
    • Environment:
      iOS, on iPhone 7.
    • Platform/s:
      iOS/tvOS/watchOS
    • Story Points:
      8
    • Sprint:
      Qt6_Foundation_Sprint 40, Team 2 Foundation_Sprint 41

      Description

      I am trying to get the magnetometer readings from iOS, but the data seems to be wrong: the values don't change as I move the phone. It works on android.

      Simple qml program to test the issue:

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtSensors 5.0
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World") 
          Magnetometer {
              id: mag
              active: true
          }    
          Text {
              anchors.fill: parent
              text: {
                  if (!mag.reading) return "WAIT";
                  return "M:\n" + mag.reading.x + "\n" +
                                  mag.reading.y + "\n" +
                                  mag.reading.z;
              }
          }
      }
      
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            tamasmartinec Tamas Martinec
            Reporter:
            guillaume-chereau guillaume-chereau
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes