Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

selvavignesh's avatar

IOS Connection to plugin invalidated while in use UIImagePickerController

I am trying to pick images from the photo library using UIImagePickerController. But When Click the button which triggers the Photo Library to open, the following error appears in the console with a blank Screen.

*com.apple.mobileslideshow.photo-picker(1.0)] Connection to plugin interrupted while in use.

2020-11-06 06:06:45.970542-0800 MyApp[31011:418892] UIImagePickerController UIViewController create error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 31095 named com.apple.mobileslideshow.photo-picker.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service on pid 31095 named com.apple.mobileslideshow.photo-picker.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}*

I have reached stackoverflow and apple developers community. No one replies so far. If someone knows how to solve this, please help me.

0 likes
2 replies
martinbean's avatar

@selvavignesh This is a forum mainly for Laravel-related questions, and not a general Q&A site like Stack Overflow. However, I took a look as I personally do have some experience in iOS development. However, I’m not really able to answer your question without seeing some code.

selvavignesh's avatar

Sorry @martinbean, I reached out to other forums, noone answered my question. That's why I reached out to laracasts.

My code

import UIKit



class AddMoviesViewController: UIViewController {



    @IBOutlet weak var PosterView: UIImageView!

    var imagePicker = UIImagePickerController()

    override func viewDidLoad() {

        super.viewDidLoad()

        imagePicker.delegate = self

        // Do any additional setup after loading the view.

    }

    



    @IBAction func Pick_Button(_ sender: Any) {

        imagePicker.sourceType = .savedPhotosAlbum

        imagePicker.allowsEditing = true

        present(imagePicker, animated: true, completion: nil)

    }

    

}



extension AddMoviesViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate {

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

        if let image = info[.originalImage] as? UIImage {

            PosterView.image = image

        }

        dismiss(animated: true, completion: nil)

    }

}

Please or to participate in this conversation.