 import UIKit
 import MobileCoreServices
 import ImageIO
+import AVFoundation
+import Deferred
 
 public typealias MediaHandler = ((URL?) -> Void)
 

        }
        
        return imagePicker
    }
    
    // MARK: UIImagePickerControllerDelegate

        }
        
        do {
            let finalURL = try writeToCache(image: image, kind: request.kind)
            self.currentRequest?.handler(finalURL)
        } catch {
            self.currentRequest?.handler(nil)
