I'm making an app that asks for access to access the image gallery. So I have to ask the user for access.
My question is:
If the user the first time cancels the permissions, how can I ask them again?
At the moment I have this code that tells me if the permissions are enabled or not
if AVCaptureDevice.authorizationStatus(forMediaType: AVMediaTypeVideo) == AVAuthorizationStatus.authorized {
//Están aceptados
}
else {
AVCaptureDevice.requestAccess(forMediaType: AVMediaTypeVideo, completionHandler: { (granted :Bool) -> Void in
if granted == true {
//Los ha aceptado
}
else {
//No los ha aceptado
}
})
}
Any possible solution?