Repository navigation
Description
Describe the bug
When you are not using profile pictures in the app. But you are depending on serverpod_auth_shared_flutter it always pulls in the image_picker & file_picker packages.
When uploading the app to the playstore you get this error
ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “MyApp.app” bundle should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. 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. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.
Stating I need to add NSPhotoLibraryUsageDescription to my Info.plist. The strange thing is, I don't use any photo library code or need to use it. So it does not make sense that I need to add it.
But you are required to add it if you want to deploy your app when you depend on severpod_auth_shared_flutter for authentication.
We should move everything related to profile pictures out of the serverpod_auth_shared_flutter and into it's own package
To reproduce
Just depend on serverpod_auth_shared_flutter and try to submit an app to the appstore without the
NSPhotoLibraryUsageDescription string in your Info.plist
Expected behavior
We should be able to upload to the AppStore without adding NSPhotoLibraryUsageDescription if you are not using it.
Library version
2.4.0
Platform information
iOS
Additional context
No response
How experienced are you with this library?
Expert - Experienced and comfortable with using this library in complex projects
Are you interested in working on a PR for this?
- I want to work on this
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone 🚀
Activity
SandPod commentedon Mar 24, 2025
Splitting out all user image management to a separate package library would make sense; the authentication module should be as non-intrusive as possible while still being simple to use.
Since it is possible to use authentication without exposing that functionality to the client we should take this into consideration.
To preserve backwards compatibility if we would like to do this in a minor version
serverpod_auth_shared_fluttershould be the superset of the flutter packages.This is also something we should take into consideration when designing the new authentication module.#3126
vanlooverenkoen commentedon Mar 24, 2025
👍 maybe we should also add this issue to the list of #3126
vanyasem commentedon Jun 2, 2025
Yep, I was quite surprised to see that the auth module triggered the AppStore warning about missing usage description.
I also do not need any of the functionality that might require those libraries.
While it doesn't really work in this particular case, as the source for the API usage is an external library, take a look at the approach taken by
permission_handler: https://github.com/Baseflow/flutter-permission-handler/tree/main/permission_handler#setup (in theiOS (click to expand)section)It allows the user to specify compile-time flags in the app's
Podfileto exclude parts of the functionality that aren't neededWhile somewhat ugly, it gets the job done. Might come in handy at some point
SandPod commentedon Jun 3, 2025
@vanyasem - Thanks for the tip! We are reworking the authentication package now, and there this split has already been made.
marcelomendoncasoares commentedon Mar 27, 2026
Closing as completed since the referenced libraries are no longer depended upon on the new auth.