Check access to Photos (iOS)

Hello!

I’d like to know if there is a way to check if the user granted access to Photos in my app (for iOS).

In my game I have a “Wallpapers” sections, where the user chooses a picture and then the app saves it to the Photo gallery. The first time the user does this, iOS asks him for permissions, but it won’t ask again. I’d like to know if I can do these two things:
a) Check if the app has access to Photos (so I can call the function to save the picture).
b) If the user rejected access, ask him again for permissions.

Thanks in advance! [import]uid: 164564 topic_id: 34059 reply_id: 334059[/import]

a) It’s not possible to check if the user has granted permission or not. You will get a “User denied access” error when you try to save. Maybe you could have some information popup that explains how to grant access to your app when/if this error occurs.

b) Once the user has denied/granted access, there’s no way of forcing the user to choose again. [import]uid: 70847 topic_id: 34059 reply_id: 135430[/import]

Hello ingemar, thanks for your help!

How can I retrieve that “user denied access” error in my code? I am using media.save API, but in the docs it says it does not return any value.
Thanks! [import]uid: 164564 topic_id: 34059 reply_id: 135432[/import]

Now that’s a good question!

In Xcode I’d use NSError get get the error info, however in Corona I really don’t know.
I have a project that I’m starting Q1 next year where this would be useful to know…

Any Corona Guru’s out there that know the answer to this? [import]uid: 70847 topic_id: 34059 reply_id: 135433[/import]

a) It’s not possible to check if the user has granted permission or not. You will get a “User denied access” error when you try to save. Maybe you could have some information popup that explains how to grant access to your app when/if this error occurs.

b) Once the user has denied/granted access, there’s no way of forcing the user to choose again. [import]uid: 70847 topic_id: 34059 reply_id: 135430[/import]

Hello ingemar, thanks for your help!

How can I retrieve that “user denied access” error in my code? I am using media.save API, but in the docs it says it does not return any value.
Thanks! [import]uid: 164564 topic_id: 34059 reply_id: 135432[/import]

Now that’s a good question!

In Xcode I’d use NSError get get the error info, however in Corona I really don’t know.
I have a project that I’m starting Q1 next year where this would be useful to know…

Any Corona Guru’s out there that know the answer to this? [import]uid: 70847 topic_id: 34059 reply_id: 135433[/import]