I'm developing an app on react native and I faced a problem with limited iOS photo permission.
I'm using this library – https://github.com/react-native-cameraroll/react-native-cameraroll to fetch photos and I have a question about native ios code.
When I set limited
permission then every time when I launch the app on a screen that fetches photos iOS shows me an alert.
I would like to disable this alert and never show it although I can't find what exactly triggers it
This is a source code of a function that I use -> https://github.com/react-native-cameraroll/react-native-cameraroll/blob/1421c1d7e4a384e3a37c42a4907738ae4fe9e399/ios/RNCCameraRollManager.m#L244
I beleive that this function triggers the alert because when I comment out it the alert does not show up, maybe I'm wrong though coz I don't have any expereince in objective-c
P.S. I've tried to modify this function but looks like it has nothing in common with the alert ;(
CodePudding user response:
To disable the automatic prompt when the user has granted limited photo access you need to add PHPhotoLibraryPreventAutomaticLimitedAccessAlert
to your info.plist