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

☆樱花仙子☆ 提交于 2019-12-04 18:32:03

问题


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).


回答1:


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.




回答2:


I ran into the same problem for iOS 10 for Xcode 8 and iPad Pro 12.9in Simulator.

If you use iPad Pro 9.7in Simulator then it works. Good god Apple, get your act straight!



来源:https://stackoverflow.com/questions/39687005/uiimagepickercontroller-stuck-on-compressing-video-on-ios10-simulator-after-choo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!