Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift UIImagePickerController未返回图像,我可以使用参考URL吗?_Swift_Uiimage_Uiimagepickercontroller_Phasset_Phimagemanager - Fatal编程技术网

Swift UIImagePickerController未返回图像,我可以使用参考URL吗?

Swift UIImagePickerController未返回图像,我可以使用参考URL吗?,swift,uiimage,uiimagepickercontroller,phasset,phimagemanager,Swift,Uiimage,Uiimagepickercontroller,Phasset,Phimagemanager,对于我的一小部分用户来说,UIImagePickerController似乎无法检索所选图像 查看我设置的日志,images键(originalImage和editedImage)是空的,info结果只有referenceURL和mediaType键 由于没有人向我发送测试用例,我也无法复制它,所以我尝试用其他方法来缓解它 我想将PHImageManager与referenceURL一起使用,以防图像密钥为空,但考虑到我需要添加有关阅读照片库的隐私通知,我不知道这是否是正确的方法 我知道iOS

对于我的一小部分用户来说,UIImagePickerController似乎无法检索所选图像

查看我设置的日志,images键(originalImage和editedImage)是空的,info结果只有referenceURL和mediaType键

由于没有人向我发送测试用例,我也无法复制它,所以我尝试用其他方法来缓解它

我想将PHImageManager与referenceURL一起使用,以防图像密钥为空,但考虑到我需要添加有关阅读照片库的隐私通知,我不知道这是否是正确的方法


我知道iOS 14中的新选择器,这将是一个遗留解决方案

一些事情,对您的问题没有任何帮助。首先,对于iOS 14+
PHPickerViewController
来说仍然有点问题。在Beta 4之前,它一直在控制台上喋喋不休,拒绝打开一些图像,而且在某些情况下它似乎仍然会崩溃——至少在我的测试中是这样。第二,也许更相关(但我不这么认为),它是唯一一个不需要在你的info.plist中发布隐私声明的VC。即使对于UIImagePickerController,您也需要添加该隐私声明。在我打开iCloud照片同步,然后尝试从我的另一部手机(在iOS 14上)选择视频后,我意外地复制了此场景。我仍然不知道如何修复它。