didFinishPickingMediaWithInfo not called

didfinishpickingmediawithinfo save image
uiimage is not convertible to 'uiimage swift 5
didfinishpickingmediawithinfo camera
image picker delegate not called
uiimagepickercontrolleroriginalimage
uiimagepickercontroller allowsediting crop size swift
swift load image from photo library
didfinishpickingmediawithinfo nil image

I have a UITableViewCell button to take an image and place it back in the cell. When I call the UIImagePickerController and take the image, it doesn't call the following delegate:

func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject], sender:AnyObject)

This is my takePhotoFunction in UITableViewController:

@IBAction func takePhoto(sender: AnyObject) {
let imagePickerController = UIImagePickerController()
imagePickerController.delegate = self
imagePickerController.allowsEditing = true

let actionSheet = UIAlertController(title: "Choose image souruce", message: nil, preferredStyle: UIAlertControllerStyle.ActionSheet)

actionSheet.addAction(UIAlertAction(title: "Take Image", style: UIAlertActionStyle.Default, handler: { (alert:UIAlertAction!) -> Void in
    imagePickerController.sourceType = UIImagePickerControllerSourceType.Camera
    self.presentViewController(imagePickerController, animated: true, completion: nil)
}))

actionSheet.addAction(UIAlertAction(title: "Photo Library", style: UIAlertActionStyle.Default, handler: { (alert:UIAlertAction!) -> Void in
    imagePickerController.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
    self.presentViewController(imagePickerController, animated: true, completion: nil)
}))
actionSheet.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil))
self.presentViewController(actionSheet, animated: true, completion: nil)}

In Swift 3, this delegate method is now called:

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])

The differences are:

  1. There is an underline _ before picker
  2. info type at the end is changed from [String : AnyObject] to [String : Any]

I had the same issue and when I made these changes it worked.

UIImagePickerController delegate not called Swift 3, After I pick a photo, the imagePicker dismisses, but the didFinishPickingMediaWithInfo method never gets called. Please help! Thanks :) func selectPhoto() {� UIImagePickerController didFinishPickingMediaWithInfo not being called with cameraOverlyView Hot Network Questions Can't astronauts use ball point pens in space?

1. Dont forget to add UIImagePickerControllerDelegate,UINavigationControllerDelegate 2. In your viewDidLoad() add picker.delegate = self 3. Add the delegate methods

public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
        let chosenImage = info[UIImagePickerControllerOriginalImage] as! UIImage 
        userImageView.contentMode = .scaleAspectFit
        userImageView.image = chosenImage
        dismiss(animated:true, completion: nil)
    }

public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {self.dismiss(animated: true, completion: nil)
}

Hope it helps :)

imagePickerController(_:didFinishPickingMediaWithInfo:), (This behavior is managed by the picker view prior to calling this method.) If the user modifies the image or movie, the editing information is available in the info� I am writing an app where the user can select photos and videos from the library. I want to implement my own video player when a video is selected but the app immediately starts the default video p

For swift 4.2

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
   if let chosenImage = info[.originalImage] as? UIImage{
        //use image
    }
}

Why can't the selected photos be d…, There's no clue to solve your issue, in the code currently shown. adding a breakpoint at `imagePickerController(_:didFinishPickingMediaWithInfo:)` ,finding that the method is never called. What should I do to make the method be called? Questions: I have a UITableViewCell button to take an image and place it back in the cell. When I call the UIImagePickerController and take the image, it doesn’t call the following delegate func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject], sender:AnyObject) This is my takePhotoFunction in the UITableViewController

Use below method for Swift 4.2:

public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]){
}

RxExtension UIImagePickerController , RxExtension UIImagePickerController: didFinishPickingMediaWithInfo not called. #1849. Closed. GRGBISHOW opened this issue on Jan 8, 2019 � 5 comments. MPMediaPickerController imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) not called when we click on done button after selection only this method called everytime . Need Help.

For Swift 4.2

This method has renamed and now should be called as below. I had the same issue that this delegate method was not calling but after this, my issue resolved.

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {

}

UIImagePickerController's delegate methods not being called � Issue , It works when I remove imagePickerController: didFinishPickingMediaWithInfo: and imagePickerControllerDidCancel: from� UIImagePickerController didFinishPickingMediaWithInfo is not called when the cameraOverlyView property is assigned I set up a UIImagePickerController modal view to record a video, and once the user chooses "Use Video" it dismisses the view controller fine and does exactly what I'd like.

didFinishPickingMediaWithInfo NOT Called Swift, didfinishpickingimage not called swift 4 uiimage is not convertible to 'uiimage uiimagepickercontroller swift 4 didfinishpickingmediawithinfo nil image get image � However, I found that it will make the UIImagePickerController can not select photo. let picker = UIImagePickerController() picker.delegate = self picker.sourceType = .photoLibrary picker.allowsEditing = false self.present(photoLib, animated: true, completion: nil) but. didFinishPickingMediaWithInfo not called

UIImagePickerController didFinishPickingMediaWithInfo not called , I have some code which works on iPhone 5 but not on iPhone 5S or iPad Air. I know that the iPhone 5 is 32 bit and the other devices are 64 bit, but I can't see� A dictionary containing the original image and the edited image, if an image was picked; or a filesystem URL for the movie, if a movie was picked.

UIImagePickerController: didFinishPickingMediaWithInfo not being , UIImagePickerController: didFinishPickingMediaWithInfo not being called - ios. closing and finishing picking with a UIImagePicker but neither ever get called? As far as I tested, using your exact code shown, the selected picture is displayed in the `imageView`. There's something wrong in the hidden parts of your project, including the story board settings. - All outlets are properly connected? Sometimes, Xcode shows fake connection and you should better re-check the connections.

Comments
  • UIImage?' is not convertible to 'UIImage'
  • Cast from 'Slice<Dictionary<UIImagePickerController.InfoKey, Any>>' (aka 'Slice<Dictionary<NSString, Any>>') to unrelated type 'UIImage' always fails
  • Hi Dheeraj, thanks for your answer. I have implemented the delegate method but after the imagpepickercontroller has completed, this method is not called.
  • did you use the delegate method that i mentioned because you delegate method is not correct and there is no delegate method as u have declared.