UIImagePickerController extension discovery failed with error: (null)

I’m working on my app with UIImagePickerController.
It was working fine yesterday but suddenly stopped working.
(When I tap the button, a white screen is presented (which is supposed to be the Image Picker). However, pictures themself aren’t presented)

In the console, I get this message
UIImagePickerController extension discovery failed with error: (null)
Here are methods related to UIIMagePickerController
What is wrong?

@IBAction func uploadImageTapped(_ sender: UIButton) {

let pickerView = UIImagePickerController()

// Set cameraroll sor chooseing a photo
// choose '.camera' if you want to take the picture
pickerView.delegate = self
pickerView.sourceType = .photoLibrary

self.present(pickerView, animated: true, completion: nil)
extension RetailerProfileViewController: UIImagePickerControllerDelegate, 
UINavigationControllerDelegate {

// method that will be called when user choose the pic
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: 
[UIImagePickerController.InfoKey : Any]) {
// get the info of photo
let image = info[.originalImage] as! UIImage
// show it
storeImage.image = image

// dismiss the photo library
self.dismiss(animated: true)

did you add permissions in your info.plist?

Yes, I did add “Privacy - Photo Library Additions Usage Description”

I found out that this program works with iPhone8 but doesn’t with iPhone11 Pro MAX. Is there any difference between these two simulators?

hmm im not sure

try debugging and checking the logs to see where the error is

maybe use try catch as well

I also found out this method is never called.

So, something is wrong with my uploadImageTapped function?

does that method get called when you use iphone 8?

if it does there may be something different from ios versions or phone versions then

Yes, it does get called