info[UIImagePickerController.InfoKey.phAsset] is nil

I've been trying to delete images from UIImagePickerController and need a PHAsset for it.
Code Block
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
guard let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage else {
return
}
if let asset = info[UIImagePickerController.InfoKey.phAsset] as? PHAsset

The image here is being fetched, but
Code Block
info[UIImagePickerController.InfoKey.phAsset]
is nil
Before the same code worked perfectly and fetched the asset. What might the problem be here?
Hello,

Have you requested photo library access? (see Requesting Authorization to Access Photos)
info[UIImagePickerController.InfoKey.phAsset] is nil
 
 
Q