UIImagePickerControllerDelegate didFinishPickingMediaWithInfo giving me an error

UIImagePickerControllerDelegate didFinishPickingMediaWithInfo giving me an error

By : Joe Dursun
Date : December 05 2020, 12:18 PM
like below fixes the issue I am trying to get the images and videos from the device and trying to declare the UIImagePickerDelegate and UINavigationControllerDelegate but on the line guard let..., it gives me an error: , Use latest syntax
code :
func imagePickerController(_ picker: UIImagePickerController, 
  didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {

guard let mediaType = info[.mediaType] as? String,
    mediaType == (kUTTypeMovie as String),
    let url = info[.mediaURL] as? URL
    else { return }

    dismiss(animated: true) {
        let player = AVPlayer(url: url)
        let vcPlayer = AVPlayerViewController()
        vcPlayer.player = player
        self.present(vcPlayer, animated: true, completion: nil)

Share : facebook icon twitter icon
UIImagePickerControllerDelegate Issues

UIImagePickerControllerDelegate Issues

By : Sherief
Date : March 29 2020, 07:55 AM
this one helps. ... yeah, I'm a moron. It was the memory issue. I was releasing self.ideas on viewDidUnload and I guess the view gets released on receipt of the memory warning because at the time the memory warning is received the image picker modal view is active, not its parent. The memory warning was only being raised when the camera was launched, not the camera roll picker, thus the different behavior depending on which was selected.
Problem UIImagePickerControllerDelegate, didFinishPickingMediaWithInfo not called

Problem UIImagePickerControllerDelegate, didFinishPickingMediaWithInfo not called

By : Banafshe Riazi
Date : March 29 2020, 07:55 AM
wish of those help Hey guys, I know it has been asked more often, but the answers to their questions don't seem to apply here. , You have a typo in your delegete method.
It should be
code :
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
- (void)imagePickController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
imagePickerController(_:didFinishPickingMediaWithInfo:) Xcode 7 Swift Error

imagePickerController(_:didFinishPickingMediaWithInfo:) Xcode 7 Swift Error

By : kenshin ruoruni
Date : March 29 2020, 07:55 AM
wish help you to fix your issue The image picker delegate is not compiling in Xcode 7. It is still compiling in Xcode 6.4. , Try:
code :
func imagePickerController(
        picker: UIImagePickerController, 
        didFinishPickingMediaWithInfo info: [String : AnyObject]) {
    // code
UIImagePickerControllerDelegate not called

UIImagePickerControllerDelegate not called

By : Jean Barroca
Date : March 29 2020, 07:55 AM
Any of those help I have a standalone class to fetch an image from the camera/photo library using UIImagePickerController. , The problem is in the following code snippet:
code :
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
    guard let image = info[UIImagePickerControllerEditedImage] as? UIImage else {
    picker.dismiss(animated: true, completion: nil)
class ViewController: UIViewController {

    var picker: ImagePickerService?

    override func viewDidAppear(_ animated: Bool) {

        DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { [weak self] in
            guard let `self` = self else { return }
            self.picker = ImagePickerService() { (image) in
            self.picker?.show(from: self)

didFinishPickingMediaWithInfo Error using Swift 5

didFinishPickingMediaWithInfo Error using Swift 5

By : user2588452
Date : March 29 2020, 07:55 AM
Hope that helps I know this question has been asked before but none of the answers have fixed my issue. I'm getting the error: , Swift 5, Xcode 11
code :
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
            backgroundImage = (info[UIImagePickerController.InfoKey.originalImage] as? UIImage)!
            ivBackground.image = backgroundImage

        picker.dismiss(animated: true, completion: nil)
Related Posts Related Posts :
  • Possible to edit Firebase Cloud Functions on an iPad and deploy changes?
  • Set DLRadioButton marginWidth between icon and title
  • How to get location of all Apple devices on same Apple ID
  • Share Specific directory in app's Documents with Files app
  • Your app uses the “prefs:root=” non public URL scheme. Best plan to update old code?
  • How to use ScrollToItem(at:) when using a custom collectionView layout to alter cell sizes
  • Appearance of UIAlertController
  • instantiate a storyboard from a button press inside a collection view cell
  • When opening APP music in background stops playing
  • Slide UIBarButtonItem from the left
  • Objective C: A cleaner way to check if a string isn't empty before creating and assigning a string to a dictionary key?
  • Using tap gesture and long press at the same time in Table View
  • Dynamically change background of SCNView in Swift
  • collectionView cell width not changing for different nib
  • DataSource for UITableView Not Updating the Array
  • prepare() not called in my custom collectionView layout
  • Filestack iOS getting 400 error "Parameters are invalid" on the image upload
  • How to add different loggers (output destination like files and Crashlytics) for logs created by oslog?
  • How can I disable a certain oslog log level?
  • iOS: Why my big files are not converted with NSData(contentsOfFile: options:)? Error Domain=NSCocaErrorDomain Code=256
  • cordova-plugin-camera installed but xcode saying plugin is not installed
  • Appcelerator / Titanium - On iPhone X, how to make the ToolBar colour fill to the bottom of the screen?
  • JWT Authentication with Alamofire download function
  • Thread 1: Exc Bad Instruction in UITableViewCell
  • How to change background color of the text field in the UISearchController?
  • How to get grouped array of struct in swift 4?
  • Where do some iPhone X ghost text captions come from? (on an Ionic app)
  • change cell's backGroundColor from imagePickerController
  • Create a constant tuple with Non-optional values and compare with another tuple which has optional values
  • iOS Firebase Crashlytics: Out Of Memory (OOM) Reporting
  • Should I write tests first (following TDD) for the view layer or only do only manual testing and add snapshot tests when
  • How to set indicatorType in KingFisher v5.0.0 from inside an extension on UIImageView?
  • Bug with UITextField inside UITableViewCell
  • having the powered by google text at the base of a tableView swift
  • ios - FontAwesome.swift how to use more icons
  • Stop presenting PushNotification
  • Core data object id format
  • Missing return in a function expected to return 'Int'
  • IOS-Swift, CarbonKit when hit back, the Icons still stayed at pager for a while, how to make them disappear immediately
  • Getting only null returns from MPMediaQuery albums query
  • Remove Line Chart values which is on the line on Chart
  • after calling TNSMutableDictionary.Create do we need to call release?
  • Why does not react-native-link work for `@segment/analytics-react-native` library?
  • Will generating new APNS certificate invalidate existing active certificate
  • How to display UIAlert textfield only once after installing APP in Swift 4?
  • Swift 3.0: Unable to infer closure type in the current context ,PromiseKit
  • FirebaseInstanceId.getInstanceId() failing with SERVICE_NOT_AVAILABLE on WearOS device connected to iPhone
  • Is the app will be approved by apple if the user registration is only through website not through app and can access the
  • kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen <object> when using ktor in Kotlin
  • ProcessInfo.processInfo.environment variables work in Simulator but not on Device
  • Difference between Multiplier and Constant in AutoLayouts
  • Depth map from AVDepthData different from HEIC file depth data in Photoshop
  • NativeScript ListView scroll event
  • How can I change the title of a group of buttons with an array?
  • How to limit UIImagePickerController to only picking portrait mode (depth effect) photos?
  • Reconnect Bluetooth 4.0 connection when user force quits the app
  • Exception when using MPSImageConvolution
  • How to properly ensure a custom UITableViewCell can be reused
  • Did FBSDKShareKit replace FBSDKMessengerShareKit?
  • How to set bottom constraint of a UITableView to the top constraint of UIView?
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org