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

QMagnetometer doesn't seem to work on iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.15.5, 6.2.0 Beta4
    • 5.12.2, 5.13.0 Alpha 1
    • Sensors
    • None
    • iOS, on iPhone 7.
    • iOS/tvOS/watchOS
    • 8
    • 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

            tamasmartinec Tamas Martinec
            guillaume-chereau guillaume-chereau
            Vladimir Minenko Vladimir Minenko
            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