zoontek / react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
MIT License
4.04k stars 828 forks source link

react native permission always return unavailable on ios camera #888

Closed Zonara-Haroon closed 1 month ago

Zonara-Haroon commented 1 month ago

Before submitting a new issue

Bug summary

My permission is granted from phone app setting. But library always return unavailable. NSCameraUsageDescription is used in my info.plist.

Library version

4.1.5

Environment info

..

Steps to reproduce

  1. install package
  2. update info.plist
  3. import package

Reproducible sample code

const response = await check(PERMISSIONS.IOS.CAMERA)
        if (response == PermissionsAndroid.RESULTS.GRANTED) {
          return true
        }else{
          const result = await request(PERMISSIONS.IOS.CAMERA);          
          if (result === RESULTS.GRANTED) {
            return true;
          } else {
            Toast.show({
              type: 'error',
              text2: 'Permission not allowed to access camera'
            });
            return false;
          }
        }
prashant-ksolves-consultant commented 2 weeks ago

@zoontek Can you please point out "Duplicate" to which issue. Can you please share link of "Duplicate" issue.