React-native-permissions: The request dialog box is showing twice.

Created on 14 Jun 2018  路  3Comments  路  Source: zoontek/react-native-permissions

Describe your environment

OS: Linux 4.13
Node: 8.11.2
Yarn: 1.7.0
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.

react-native-permissions latest

How to repeat issue and example

The dialog box for permission is showing twice. One of the react-native-permissions
and other from React native, I guess. How to show only the dialog request from the react-native-permissions?

All 3 comments

The sample code would show dialogs twice.
To just show system dialog on iOS, you may call Permissions.request directly:

if (this.state.photoPermission == 'undetermined') {
   Permissions.request(...)
}

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

Same issue.

"react-native": "0.61.5",
"react-native-permissions": "^2.0.9",

Was this page helpful?
0 / 5 - 0 ratings