Post

Replies

Boosts

Views

Activity

info[UIImagePickerController.InfoKey.phAsset] is nil
I've been trying to delete images from UIImagePickerController and need a PHAsset for it. 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 info[UIImagePickerController.InfoKey.phAsset] is nil Before the same code worked perfectly and fetched the asset. What might the problem be here?
2
0
2.6k
Jul ’20