Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. iOS upload to Appstore error: missing NSPhotoLibraryUsageDescription

iOS upload to Appstore error: missing NSPhotoLibraryUsageDescription

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 2 Posters 3.1k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ekkescornerE Offline
    ekkescornerE Offline
    ekkescorner
    Qt Champions 2016
    wrote on last edited by ekkescorner
    #1

    Qt 5.7
    XCode 8

    suddenly running into errors after uploading app to appstore for testflight:

    This app attempts to access privacy-sensitive data without usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key .....
    

    Googled and found that many iOS devs are running into the same issue.
    But: I'm doing nothing with Photos
    I'm storing and reading JSON in QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)
    I'm not using PictureLocation

    any ideas what's wrong ?

    added this to Info.plist:

            <key>NSPhotoLibraryUsageDescription</key>
            <string>$(PRODUCT_NAME) uses photos</string>
    

    Now I can upload to itunes connect, but I never access Photos.

    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
    5.15 --> 6.9 https://t1p.de/ekkeChecklist
    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Any chance of this starting after an iOS 10 update ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • ekkescornerE Offline
        ekkescornerE Offline
        ekkescorner
        Qt Champions 2016
        wrote on last edited by ekkescorner
        #3

        my iPhone is still 9.3.5

        as I found from Google searches that other devs also run into this, because Apple now (since 10.0 is out) seems to check it different as before.
        but happens for devs using Photo Library

        and I'm definitely doing nothing with photos
        only idea is that there's something special with Qt's AppDataLocation

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.9 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          IIRC, QStandardPaths can return the path to the photo library and it might also be handled by QFileDialog so that could explain the requirement.

          One thing to take into account: the text provided with NSPhotoLibraryUsageDescription and friends will be shown to the user when requesting matching permissions. So depending on your app target, you'll have to provide translations for these texts.

          It might not be the case for your current app but for another one in the future.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          ekkescornerE 1 Reply Last reply
          0
          • SGaistS SGaist

            IIRC, QStandardPaths can return the path to the photo library and it might also be handled by QFileDialog so that could explain the requirement.

            One thing to take into account: the text provided with NSPhotoLibraryUsageDescription and friends will be shown to the user when requesting matching permissions. So depending on your app target, you'll have to provide translations for these texts.

            It might not be the case for your current app but for another one in the future.

            ekkescornerE Offline
            ekkescornerE Offline
            ekkescorner
            Qt Champions 2016
            wrote on last edited by
            #5

            @SGaist thx for your translation hint.

            The curios thing is that the only QStandardPath I'm using is

            GenericDataLocation	Android: "<USER>"	iOS:"<APPROOT>/Documents"
            

            where I'm caching JSON files. The App is never asking for Photo Library Permission -
            it's only while uploading to the store where (beginning with Xcode8 / iOS10) iTunesConnect requires this entry

            perhaps Xcode8 cannot recognize which QStandardPathes are used, so adding this permission
            using Xcode 7.3 all works without

            ekke ... Qt Champion 2016 | 2024 ... mobile business apps
            5.15 --> 6.9 https://t1p.de/ekkeChecklist
            QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Pure supposition but there's likely a scan somewhere that checks for that kind of constants in user code/library without checking that it is indeed used but it triggers Apple warning system anyway.

              A bit more of information about NSPhotoLibraryUsageDescription here.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              ekkescornerE 1 Reply Last reply
              0
              • SGaistS SGaist

                Pure supposition but there's likely a scan somewhere that checks for that kind of constants in user code/library without checking that it is indeed used but it triggers Apple warning system anyway.

                A bit more of information about NSPhotoLibraryUsageDescription here.

                ekkescornerE Offline
                ekkescornerE Offline
                ekkescorner
                Qt Champions 2016
                wrote on last edited by
                #7

                @SGaist aaah - so they changed something with 10.0

                ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                5.15 --> 6.9 https://t1p.de/ekkeChecklist
                QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved