Hello, I am able to select a photo from the Simulator's library and display the image; however, when testing on a device, the image is displayed for only about 2 lines and the rest of the image is grey. The camera works fine, just pulling from the Library
The code:
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
debugPrint(info)
if let pickedImage = info[UIImagePickerController.InfoKey.originalImage] {
imageView.image = pickedImage as? UIImage
}
picker.dismiss(animated: true, completion: nil)
}
The error:
"Select photo from Library"
[__C.UIImagePickerControllerInfoKey(_rawValue: UIImagePickerControllerMediaType): public.image, __C.UIImagePickerControllerInfoKey(_rawValue: UIImagePickerControllerImageURL): file:///private/var/mobile/Containers/Data/Application/353124C0-4BA6-41F8-AD29-D2D59D392A32/tmp/5E75F594-077A-42A4-81FF-7895E135B1D6.jpeg, __C.UIImagePickerControllerInfoKey(_rawValue: UIImagePickerControllerOriginalImage): <UIImage:0x2814082d0 anonymous {1656, 765}>, __C.UIImagePickerControllerInfoKey(_rawValue: UIImagePickerControllerReferenceURL): assets-library://asset/asset.JPG?id=A5371371-FFD0-43D4-8CEB-0A887E2DBBB5&ext=JPG]
2019-09-04 14:39:19.745759-0500 AnnotatedImageView[5782:3228117] createDataWithMappedFile:1508: 'open' failed '/var/mobile/Media/PhotoData/Mutations/DCIM/100APPLE/IMG_0050/Adjustments/FullSizeRender.jpg' error = 1 (Operation not permitted)
2019-09-04 14:39:19.745894-0500 AnnotatedImageView[5782:3228117] createDataWithMappedFile:1508: 'open' failed '/var/mobile/Media/PhotoData/Mutations/DCIM/100APPLE/IMG_0050/Adjustments/FullSizeRender.jpg' error = 1 (Operation not permitted)
2019-09-04 14:39:19.746004-0500 AnnotatedImageView[5782:3228117] createDataWithMappedFile:1508: 'open' failed '/var/mobile/Media/PhotoData/Mutations/DCIM/100APPLE/IMG_0050/Adjustments/FullSizeRender.jpg' error = 1 (Operation not permitted)
2019-09-04 14:39:19.746923-0500 AnnotatedImageView[5782:3228117] createDataWithMappedFile:1508: 'open' failed '/var/mobile/Media/PhotoData/Mutations/DCIM/100APPLE/IMG_0050/Adjustments/FullSizeRender.jpg' error = 1 (Operation not permitted)
2019-09-04 14:39:19.748324-0500 AnnotatedImageView[5782:3228117] [0x10212c800] Decoding failed with error code -1
2019-09-04 14:39:19.748359-0500 AnnotatedImageView[5782:3228117] [0x10212c800] Decoding: C0 0x067802FD 0x0068304A 0x22111100 0x000C0004 225579
2019-09-04 14:39:19.748383-0500 AnnotatedImageView[5782:3228117] [0x10212c800] Options: 1656x765 [FFFFFFFF,FFFFFFFF] 00025060