I want to get the file name from UIImagePickerControllerPHAsset in ios 11.0.3. Failed to get the selected image file name using this code. please help with this?
if #available(iOS 11.0, *) { let asset = info[UIImagePickerControllerPHAsset] as? PHAsset fileName = ((asset?.value(forKey: "filename")) as? String)! } else {
Getting crashes in the fileName = ((asset? .Value (forKey: "filename")) as? String)!
source share