install react-native-vector-icons will cause READ_PHONE_STATE permission on Android
•vibekōdo•1 min read
I was surprised to see that after installing react-native-vector-icons, my Android app was requesting the READ_PHONE_STATE permission,
along with READ_PHONE_STATE, it also requested READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions.
I don't like Play Store saysing my app needs these permissions when I don't use any feature that requires them.
For now, I have removed these permissions by adding the following to my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
^^^ add xmlns:tools above ^^^
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />