iOS upload to Appstore error: missing NSPhotoLibraryUsageDescription


  • Qt Champions 2016

    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.


  • Lifetime Qt Champion

    Hi,

    Any chance of this starting after an iOS 10 update ?


  • Qt Champions 2016

    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


  • Lifetime Qt Champion

    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.


  • Qt Champions 2016

    @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


  • Lifetime Qt Champion

    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.


  • Qt Champions 2016

    @SGaist aaah - so they changed something with 10.0


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.