I want to get the file name from UIImagePickerController. I do not want to use ALAssetLibrary because it is deprecated in iOS 9. I have used the following code
UIImagePickerController
Swift 5, iOS 11+
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { let photo = info[.phAsset] as? PHAsset let filename = photo?.value(forKey: "filename") as! String }