-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changelog-Fixed: Save Image Permissions #1403
Conversation
I believe this is a very non-standard way to do this. Almost every app I've ever used will re-prompt for access before trying to save. If we know it will fail before we try and we have a way to fix it we should attempt the fix first. This change would still be useful for if they are out of space on disk, but if that was the case we should alert them of that specific problem. |
cc @bryanmontz |
I would agree, and it was something I looked into. Not sure if it is just me, and something I will look further into, but in order to perform this check I had to change the permissions from the privacy photos “additions” permission, to the more general photos permissions, and I would wonder if that would be acceptable if it is indeed the case that I have to change it? |
On Mon, Jul 31, 2023 at 09:29:34AM -0700, doffing.brett wrote:
> I believe this is a very non-standard way to do this. Almost every
> app I've ever used will re-prompt for access before trying to save.
> If we know it will fail before we try and we have a way to fix it we
> should attempt the fix first.
I would agree, and it was something I looked into. Not sure if it is
just me, and something I will look further into, but I had to change
the permissions from the privacy photos “additions” permission, to the
more general photos permissions, and I would wonder if that would be
acceptable if it is indeed the case that I have to change it.
Seems weird we would need to switch to general permissions just to
prompt for the additions permission, if this is what you're saying? 🤔
|
It was me. I was asking for |
I will keep it around and try to implement a check for a disk space error. |
Once you show the photos access system prompt to the user once, it will not show again. This is also true for the GPS location prompt and the notifications prompt. So showing it again is not an option. The console explains why the app crashes when you try to request
Overall, this PR seems like a reasonable way to handle it: try to save the image, and report to the user if it fails. We are showing the user the Save Image button in the pop-up menu, and we could already know that it will fail (using |
We could also improve the user experience by sending them to the Damus settings view in Settings.app with this: UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!) |
What is unclear to me at this point is whether to implement both the permissions check via |
On Tue, Aug 01, 2023 at 05:33:53AM -0700, Bryan Montz wrote:
We could also improve the user experience by sending them to the Damus settings view in Settings.app with this:
```swift
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
```
I think this is what I was remembering from other apps, not re-prompting for permissions like you mentioned which is not possible.
|
Ad `ImageSaver` class to handle saving errors Remove print statement Display alert according to error type Check for permissions Add ImageSaverError and defaults
ffc8e63
to
6f91570
Compare
what's the status of this? did we come to a conclusion ? |
Currently, without permission, saving an image will fail silently and simply not save the image. This PR adds an
ImageSaver
class to handle permission failures when saving images, as well as display an alert upon failure.[Fixes: #1150]