React-native-permissions: How to remove unnecessary permissions on iOS?

Created on 26 Mar 2018  Â·  20Comments  Â·  Source: zoontek/react-native-permissions

Describe your environment

  • React-Native version: 0.51.0
  • Platform: iOS,
  • Device: Any
  • 11+
  • react-native-permissions: 1.1.1
  • Devtools: Xcode

How to repeat issue and example

Build a release mode with react-native-permission as library and upload to Appstore. Apple will reject the app with following reason

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data

Temporary fix would be to just add these permissions in Info.pList.
Is there anyway I don't have to add these permissions in my info pList and instead just remove the files using those permissions as i don't need these permissions at all in my app.

Most helpful comment

I'm building a privacy-first application. It would be devastating for the
trust of my users if they all of a sudden would see my app asking for weird
permissions(I think it will show up in Settings > App_Name > Permissions).
I also think there is ways to see it in the Apple Store.

So for me, it's definitely not about laziness, but about the trust and
promise I give my users that I won't collect information about them,
completely removing these things for my codebase.

On Fri, May 4, 2018 at 1:26 PM Roberto Wesley Overdijk <
[email protected]> wrote:

Right but, what's the downside of adding it to your plist? Laziness? Or is
there an actual reason?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yonahforst/react-native-permissions/issues/240#issuecomment-386572884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmKh_st3m1ocbS948mL8hQq69C845DAks5tvDr8gaJpZM4S7SA7
.

>

Best Regards,
Piérre Reimertz
reimertz.co | twitter http://twitter.com/reimertz | github
http://github.com/reimertz

All 20 comments

Just got this issue as well. I need to be able to exclude this since the entire reason I created this app was to introduce privacy protections. 😄

A quick fix would be to fork and just remove files related to permissions I won't ask for.

@rohitgoyal seems we both missed this discussion. Guess this issue can be closed for now.

@reimertz Should i just remove the .m files of these particular permissions?
Or can you elaborate all the steps i need to follow in order to ensure nothing breaks?

Oops, I didn't paste the link. Check this: https://github.com/yonahforst/react-native-permissions/issues/46

You can also check my own fork I did where I removed

  • Bluetooth
  • Calendar
  • Events
  • Speech Regocnition

Given the actual form of the library, you can't.
A way to do it could be using Cocoapods, like in https://github.com/delba/Permission#cocoapods (and ditch the Android permissions because it's now build in React Native)

Having those entries in your plist won't cause any trouble. The user will never see them, unless you request them.

Unless I'm wrong. In which case, please let me know. :D

The issues surfaces when you upload for App Store review. Their automated
systems will complain that you have functionalities in the app that might
require permissions you haven’t officially added in info.plist.

I’ve read that you can tell the reviewer this but it seems to be totally
random when they let this pass.
On Fri, 4 May 2018 at 12:35, Roberto Wesley Overdijk <
[email protected]> wrote:

Having those entries in your plist won't cause any trouble. The user will
never see them, unless you request them.

Unless I'm wrong. In which case, please let me know. :D

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yonahforst/react-native-permissions/issues/240#issuecomment-386563148,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmKh19yYz0_aaVpGY4J3BafjkPmuhp8ks5tvC7igaJpZM4S7SA7
.

>

Best Regards,
Piérre Reimertz
reimertz.co | twitter http://twitter.com/reimertz | github
http://github.com/reimertz

Right but, what's the downside of adding it to your plist? Laziness? Or is there an actual reason?

I'm building a privacy-first application. It would be devastating for the
trust of my users if they all of a sudden would see my app asking for weird
permissions(I think it will show up in Settings > App_Name > Permissions).
I also think there is ways to see it in the Apple Store.

So for me, it's definitely not about laziness, but about the trust and
promise I give my users that I won't collect information about them,
completely removing these things for my codebase.

On Fri, May 4, 2018 at 1:26 PM Roberto Wesley Overdijk <
[email protected]> wrote:

Right but, what's the downside of adding it to your plist? Laziness? Or is
there an actual reason?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yonahforst/react-native-permissions/issues/240#issuecomment-386572884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmKh_st3m1ocbS948mL8hQq69C845DAks5tvDr8gaJpZM4S7SA7
.

>

Best Regards,
Piérre Reimertz
reimertz.co | twitter http://twitter.com/reimertz | github
http://github.com/reimertz

It would be devastating for the
trust of my users if they all of a sudden would see my app asking for weird
permissions

It won't ask unless requested from within the app. If it does, that has to be a bug somewhere.

I think it will show up in Settings > App_Name > Permissions

That might be true. Good info, I'll check if that's the case! I wouldn't enjoy that either. In my case it'd be less of an issue because it's all disabled by default and I won't be asking for these permissions. But if it is an issue in your app, it's a legit one. I agree.

I also think there is ways to see it in the Apple Store.

I tried looking it up, and couldn't find it.

So for me, it's definitely not about laziness, but about the trust and
promise I give my users that I won't collect information about them,
completely removing these things for my codebase.

Makes sense if your first point holds true.

Thanks for the info!

Update

So for me, it's definitely not about laziness

I didn't imply you're lazy. I meant in general, what the objections could be. Just making sure you don't feel like I tried insulting you! 😄

@reimertz I just checked and, at least in the simulator and in dev builds the extra permissions don't show up in settings.

Apple announced at WWDC (Platforms State of the Union) that soon all permissions need to have very descriptive descriptions with examples in the plists, otherwise they will reject the app. So it might be the right time to make it possible to not include them all my default.

can we have a postinstall to strip some files?

Any update on this? my app just got rejected :(

@cayasso for now, you'd have to fork and manually remove permissions you won't use.

I'm really sorry but I don't jave the bandwidth to find a proper solution right now except maintaining my own fork.

Thanks @reimertz, its ok, I went and added the permissions in Info.plist for now with some comments like we will never request this permission and that works, Apple accepted it :-)

Wtf, good to know. :D
On Wed, 22 Aug 2018 at 14:52, Jonathan Brumley notifications@github.com
wrote:

Thanks @reimertz https://github.com/reimertz, its ok, I went and added
the permissions in Info.plist for now with some comments like we will
never request this permission and that works, Apple accepted it :-)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yonahforst/react-native-permissions/issues/240#issuecomment-415020896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmKh4yZwv_W1JTBWeoeM-T1lmOUbpmbks5uTVQAgaJpZM4S7SA7
.

>

Best Regards,
Piérre Reimertz
reimertz.co | twitter http://twitter.com/reimertz | github
http://github.com/reimertz

Any update for this issue? Apple rejected us because of an unnecessary option?

@saeedtkh seems like everyone (including me) are using forks of this library where we are each keeping only the permissions we need

I am closing this since this issue does not exists anymore with the 2.0.0 release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tmpapageorgiou picture tmpapageorgiou  Â·  18Comments

al-shivani picture al-shivani  Â·  25Comments

bithavoc picture bithavoc  Â·  22Comments

vvsevolodovich picture vvsevolodovich  Â·  24Comments

WrathChaos picture WrathChaos  Â·  25Comments