Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImagePickerController stuck on compressing video on iOS10 simulator after choosing a video

I had this app that always worked normally on iOS9, now I've migrated the swift code to 3.0 and added the required plist rows to get access to photos library.
While trying to pick a video (preloaded by dragging) from the camera roll using UIImagePickerControlleron simulator it always get stuck on "Compressing Video" and doesn't callback the delegate methods.

   @IBAction func videoFromLibrary(_ sender: UIBarButtonItem) {
        picker.allowsEditing = false
        picker.sourceType = .photoLibrary
        picker.mediaTypes = UIImagePickerController.availableMediaTypes(for: .photoLibrary)!
        picker.modalPresentationStyle = .popover
        present(picker, animated: true, completion: nil)
        picker.popoverPresentationController?.barButtonItem = sender
    }

Using a real device it works fine, it really seems to be an Apple bug, I'm wondering if anyone had this issue or I'm missing something to make UIImagePickerController work again correctly using videos on simulator (or if there is a workaround).

like image 541
Andrea Avatar asked Sep 25 '16 12:09

Andrea


1 Answers

I was having this same problem running it on the iPhone 7 Plus simulator but it seems to dismiss when I run it on an iPhone 6s Plus simulator. Maybe a bug in the simulator.

like image 75
adrielR Avatar answered Sep 27 '22 23:09

adrielR