             break
         }
 
-        if authorized {
-            completion?(createCaptureDevice(mediaType))
-            return
-        }
+        return authorized
+    }
 
-        checkRequiredPlistValues()
-
+    class func requestAccess(mediaType: MediaType, completion: CaptureDeviceAuthorizationCompletionBlock?) {
         AVCaptureDevice.requestAccess(for: mediaType.stringConstant()) { authorizationGranted in
             if !authorizationGranted {
                 let authorizationError: NSError? = NSError(domain: CaptureDeviceAuthorizationErrorDomain, code: CaptureDeviceAuthorizationErrorCode.denied.rawValue, userInfo: [NSLocalizedDescriptionKey: "Capture device for media type \(mediaType.stringConstant()) not available.", NSLocalizedFailureReasonErrorKey: "The user denied the request to access \(mediaType.stringConstant())."])

import AVFoundation
import Foundation

enum MediaType {
    case video
    case audio
    case text

        }
    }

    class func createCaptureDevice(_ mediaType: MediaType) -> CaptureDeviceAuthorizationResult {
        let captureDevice = AVCaptureDevice.default(for: mediaType.stringConstant())
        return (captureDevice: captureDevice, authorizationError: nil)
    }
