zoontek / react-native-permissions

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

Unable to detect IOS album permissions #866

Closed nsh635211 closed 7 months ago

nsh635211 commented 7 months ago

Before submitting a new issue

Bug summary

Hello, when I set up the key > NSPhotoLibraryAddUsageDescription < / key >

Your consent is required to obtain the permission to write the album, which is used to save the photo to the album

< key > NSPhotoLibraryUsageDescription < / key >, and has opened the photo album, But await the check (Permissions. The Permissions. IOS. PHOTO_LIBRARY_ADD_ONLY) return values has been unavailable

Library version

"react-native-permissions": "^3.4.0",

Environment info

OS: macOS 13.5
    CPU: (8) x64 Apple M1
    Memory: 24.90 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 14.21.3 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 6.14.18 - /usr/local/bin/npm
    Watchman: 2023.10.09.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.13.0 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.21 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.67.2 => 0.67.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

I tested this in both the emulator and the real machine and the result was the same: unavailable

Reproducible sample code

const status1 =  await check(Permissions.PERMISSIONS.IOS.PHOTO_LIBRARY_ADD_ONLY)
const status =  await check(Permissions.PERMISSIONS.IOS.PHOTO_LIBRARY)
zoontek commented 7 months ago

This version of react native is not supported anymore. Update to react-native-permissions v4 and Xcode 15.