iOS Permission Bug Photos / unable to download images / re-install needed
Description:
Permission to download images handled incorrectly.
Environment Information:
- Rocket.Chat Server Version: 6.3 (likely unrelated)
- Rocket.Chat App Version: 4.41.0
- Device Name: iPhone 13 Pro Max
- OS Version: 17.0.3
Steps to reproduce:
- Install the app brand new, login.
- Click on a image in a chat.
- Click DOWNLOAD icon
- It should now ask wether you want to switch gallery permissions to all photos / selected photos or stay with the permissions "only add photos" - select "only add photos"
- Now you get "Error while downloading" - does not ask for any permissions again
Expected behavior:
1.) Download should work without read access to pictures. 2.) When required permissions are missing for an action the app should ask again for those permissions instead of throwing an error.
Actual behavior:
"Error while downloading"
Additional context:
In the iOS settings app if you search for Rocket.Chat you are unable to select any different photo permission then "None" or the already selected one "Only add photos" => Reinstall needed
Thanks for your report! We will verify it.
Also, we are open to the community’s PR!
hey , i could reproduce the issue and understand the problem. Can i work on it?
hey @reinaldonetof @GleidsonDaniel , the only approach i could think of is installing a library like react-native-permissions to explicitly check for the persmission? how to proceed?
@atulsingh98 As far as I know, on iOS it is not possible to request permissions again. So the library would only work to check the user's permission. However, as long as it works, I don't see a problem adding this library, just check if it is really necessary to add this library.
@GleidsonDaniel "As far as I know, on iOS it is not possible to request permissions again."
You are right about that! So let me re-phrase the expected behavior: Provide the user with an understandable error and guide them on how to enable permissions in iOS settings without having to re-install the app (other apps do that as well).
okay so what we can do is display a modal which links to the settings where we can change app permission. would this be a good flow to implement ?Also without using library we would have to use native swift code @GleidsonDaniel
I don't think it needs to be something like that, just a warning that the photo was not downloaded due to permission issues and the link to the setting. On Android, just ask again.
https://github.com/RocketChat/Rocket.Chat.ReactNative/assets/47176488/4f0306a5-dbdc-4d09-9400-90ff8e10b1e3
i implemented something like this. is this ok?
Also we need to give full access and not just the "Add photos only" option because we save our media in a custom album https://github.com/react-native-cameraroll/react-native-cameraroll?tab=readme-ov-file#ios-1 as pointed out here . @reinaldonetof would love your inputs on how to proceed and then open a pr for this
Hey @atulsingh98, I liked your solution. But we need to evaluate properly with the design and product team to understand what is the expected behavior.
Alright , let me know as well if i can work on it.
Alright , let me know as well if i can work on it.
IMHO, open your PR to it. Any changes we can handle there, but you are on the right path.
done :-)
any update for this issue?
We do have an PR for this :'-)
Can someone check if Android has the same issue? The PR fixes iOS only.
I checked in my Android 14, it didn't asked for any permission to download the image but it saved the image. Seems it's only related to iOS only