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

QIOSFileDialog: Could not resolve Qt plugin that gives access to photos on iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 6.7.2
    • Quick: Dialogs
    • None
    • iOS/tvOS/watchOS

    Description

      upon opening FileDialog{} on iOS, i have following error and nothing happens:

      QIOSFileDialog: Could not resolve Qt plugin that gives access to photos on iOS 

      code looks like:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Dialogs
      import QtCore
      
      Window {
      	id: root
      
      	FileDialog {
      		id: fileDialog
      		title: qsTr("Choose a folder with some images")
      		//options: FileDialog.DontUseNativeDialog	// | FileDialog.ReadOnly
      		options: FileDialog.ReadOnly
      		fileMode: FileDialog.OpenFile
      		modality: Qt.WindowModal
      		currentFolder: if (Qt.platform.os === "ios") { return "file:assets-library://"; }			// same issue, initialy tried StandardPath for iOS with same result
      				else { return StandardPaths.standardLocations(StandardPaths.PicturesLocation).pop(); }
      		
      	}
      
      	Component.onCompleted: fileDialog.open()
      }

       

      and of course in my Info.plist.in I have:

          <key>NSPhotoLibraryUsageDescription</key>
          <string>This app requires access to your pictures</string> 

      For windows and Android all works fine... native picker opens and works fine.

      Am I missing someting? in CMake or main.cpp for example?

      Attachments

        1. image-2024-09-19-16-43-19-028.png
          4 kB
          Jiri Zaloudek
        2. image-2024-09-19-16-43-49-183.png
          4 kB
          Jiri Zaloudek
        3. screen.jpg
          106 kB
          Jiri Zaloudek

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              shokarta Jiri Zaloudek
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes