sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

Do you face similar issue of App Store review rejection for privacy info.plist strings? #240

Closed jevonmao closed 3 years ago

jevonmao commented 3 years ago

Hi @ivanvorobei , I'm the owner and creator of PermissionsSwiftUI, a permission request and display library large inspired by your SPPermissions. Despite the different codebase and rewrite in SwiftUI, I believe this can be a common issue that both our libraries share.

Recent, a developer submitted a bug report to my library stating that:

TL;DR Due to App Store's review guidelines, any user data API referenced in code, even if not used must require an info.plist string. As a result, a permission request library would contain API references to all the different permissions, but most users only need some of the permissions. It will be redundant and inconvenient to add every single info.plist string.

I only use Location, notification permissions from this swift package. Yet I am asked to include all of these different type of usage description strings. I believe this is because this swift package uses all of the permission types in PermissionsManager. Is there a way for me to not include all usage descriptions?

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 NSContactsUsageDescription 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.

In your README.md, you say that "If you use xliff localization export, keys will be create automatically." And you also provided all the privacy string keys. Does your library's users face similar issue of their apps using SPPermission being rejected from the App Store? If not, do you mind explaining in further detail how did you tackle this issue? How to automatically generate info.plist keys? Thank you very much for taking the time to read this, and I greatly appreciate any help or idea.

ivanvorobei commented 3 years ago

Good day!

I have same issue maybe 3 years ago, because library shouldn't import all modules. You can check my Podspec. When user install my library, will import only usage code (for location example) and don't imports other modules.

jevonmao commented 3 years ago

Thank you very much, you are such a kind and helpful person. I will probably implement a similar solution in my library.