Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSPhotoLibraryUsageDescription required for iOS even when only using FileType.custom #783

Closed
stephanie-finch opened this issue Jul 31, 2021 · 1 comment
Labels
new issue An issue that hasn't yet been seen from the maintainer

Comments

@stephanie-finch
Copy link

stephanie-finch commented Jul 31, 2021

TestFlight notified us that NSPhotoLibraryUsageDescription is required even though we only have one FilePicker call that doesn't request for photos. The documentation in https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup#ios says it should only be required for image/video file types.

final FilePickerResult? result = await FilePicker.platform.pickFiles(
   type: FileType.custom, 
   allowedExtensions: ['zip'],
);

Message from TestFlight:
"ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs."

@stephanie-finch stephanie-finch added the new issue An issue that hasn't yet been seen from the maintainer label Jul 31, 2021
@miguelpruivo
Copy link
Owner

Hi, it seems that now devs should add the entitlements that the app (or any plugin) could attempt to use. Since the plugin uses API for accessing those features, you'll need to add it as well, however, it won't prompt a permission warning to your users unless you actually use it at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer
Projects
None yet
Development

No branches or pull requests

2 participants