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

FileDialog fails opening iCloud file on iOS

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      With Qt 6.3.2, the QtQuick.Dialogs FileDialog was able to open files from iCloud and other networked storage services such as Google drive. With Qt 6.5.3 and 6.6.1, it is not able to open these files. The UI allows the user to select files from iCloud or Drive, but there is an error message and the file URI returned is empty.

      On MacOS, opening iCloud files works fine with all versions.

      To reproduce the issue, open any example using Qt 6.5.3 or 6.6.1 for iOS, and paste the following QML code

      import QtQuick
      import QtQuick.Dialogs
      import QtQuick.Controls

      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World"){{    }}

          FileDialog
          {
                  id: fileDialog
                  modality: Qt.WindowModal            onAccepted:
                  {
                      console.log("selectedFile:  ",  selectedFile)
      {{            }}}
                  onRejected:
                  {
                      console.log("FileDialog: Rejected")
      {{            }}}
      {{    }}}{{    }}

          Button {
              anchors.centerIn: parent

              text: "Open single file"
              onClicked:  {
                      fileDialog.fileMode = FileDialog.OpenFile;
                      fileDialog.open();
      {{        }}}
      {{    }}}
      }{}

      Click the button and select a file from iCloud. Watch the console output. With Qt 6.3.2 I get a valid file:

      qml: selectedFile:      file:///private/var/mobile/Containers/Data/Application/B52E99C4-E7F6-4144-A55D-C16C16D53768/tmp/com.memorymap.apptestfileopen-Inbox/P1.gpx

      with Qt 6.5.3 I get the error message on the console and the selected file property is empty.

      qrc:/testfileopen/Main.qml:14:5: QML FileDialog: Cannot set /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Documents/P1.gpx as a selected file because it doesn't exist

      {{qml: selectedFile:      }}

       

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              rss Richard Stephens
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes