0

I have a problem asking permission for the camera. When I install the app on my iPhone 6s plus with iOS 10.1 it works. But if I try on my iPad 2 with iOS 9.3.5, the permissions are not asked and the room camera shows only black.

if AVCaptureDevice.authorizationStatusForMediaType(AVMediaTypeVideo) ==  AVAuthorizationStatus.Authorized
{
    print("tutto apposto");
}
else
{
    AVCaptureDevice.requestAccessForMediaType(AVMediaTypeVideo, completionHandler: { (granted :Bool) -> Void in
        if granted == true
        {
            print("concessa");
        }
        else
        {
            print("negata");
        }
    });
}

In the iPad I receive always "negata". How can I solve this problem?

Cœur
  • 37,241
  • 25
  • 195
  • 267
WillyWon
  • 15
  • 3

0 Answers0