UIImagePicker controller has been working fine forever in my code while selecting an image from the UIImagePickerController.
But all of a sudden with the iOS 12.2 Betas, info[UIImagePickerController.InfoKey.imageURL] contains nil for all images!! Which means I can't obtain the URL for the image & use it!!
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
picker.dismiss(animated: true, completion: { [unowned self] in
guard info[UIImagePickerController.InfoKey.mediaType] != nil else { return }
let mediaType = info[UIImagePickerController.InfoKey.mediaType] as! CFString
if mediaType == kUTTypeImage {
if var imageURL = info[UIImagePickerController.InfoKey.imageURL] as? URL {
self.employImageAtURL(imageURL)
} else {
fatalError("Failed to get imageURL") //CALLED EVERY TIME NOW!!
}
}
})
}
Is anyone else seeing this problem? Please help!