选择视频后,UIImagePickerController卡在iOS10模拟器上压缩视频 [英] UIImagePickerController stuck on compressing video on iOS10 simulator after choosing a video

查看:91
本文介绍了选择视频后,UIImagePickerController卡在iOS10模拟器上压缩视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以在iOS9上正常运行的应用,现在我已将swift代码迁移到3.0,并添加了必需的plist行以访问照片库.
尝试在模拟器上使用UIImagePickerController从相机胶卷中拾取视频(通过拖动预加载)时,它始终卡在压缩视频"上,并且不会回调委托方法.

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
    }

使用真实的设备工作正常,这似乎确实是Apple的错误,我想知道是否有人遇到此问题,或者我是否缺少某些东西可以使UIImagePickerController在模拟器上使用视频再次正常工作(或者有一种解决方法.

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

推荐答案

我在iPhone 7 Plus模拟器上运行它时遇到了同样的问题,但是当我在iPhone 6s Plus模拟器上运行它时,似乎无法解决.也许是模拟器中的错误.

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.

这篇关于选择视频后,UIImagePickerController卡在iOS10模拟器上压缩视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆