Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled"

Tags:

swift

I am trying to display or upload UIImage and I am getting this error.

"errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}"

import UIKit

class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate { 

// linked labels and UiButtons

@IBOutlet weak var ifix: UILabel!
@IBOutlet weak var UIImage: UIImageView!
let someImageView: UIImageView = {
    let theImageView = UIImageView()
    theImageView.translatesAutoresizingMaskIntoConstraints = false // call this property so the image is added to your view
    return theImageView
}()


@IBAction func UploadImage(_ sender: UIButton) {
    let myPickerController = UIImagePickerController()
    myPickerController.delegate = self;
    myPickerController.sourceType =  UIImagePickerController.SourceType.photoLibrary
    self.present(myPickerController, animated: true, completion: nil)

}
    @objc func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any])
    {
        let image_data = info[UIImagePickerController.InfoKey.originalImage] as? UIImage
        let imageData:Data = image_data!.pngData()!
        _ = imageData.base64EncodedString()
        self.dismiss(animated: true, completion: nil)
    }


@IBAction func UIShuffle(_ sender: UIButton) {
}


@IBAction func UIReset(_ sender: UIButton) {
}

override func viewDidLoad() {
    super.viewDidLoad()
    // additional setup after loading the view, typically from a nib.
    view.addSubview(someImageView) //This add it the view controller without constraints
    someImageViewConstraints() //This function is outside the viewDidLoad function that controls the constraints

}
//  `.isActive = true` after every constraint
func someImageViewConstraints() {
    someImageView.widthAnchor.constraint(equalToConstant: 180).isActive = true
    someImageView.heightAnchor.constraint(equalToConstant: 180).isActive = true
    someImageView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
    someImageView.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 28).isActive = true


}

}
like image 400
Asge Yohannes Avatar asked Oct 31 '18 02:10

Asge Yohannes


1 Answers

This message is harmless. The message comes from the OS and is related to the OS keeping an eye out for any newly discovered extensions related to whatever your app is doing. I see it often on macOS when displaying an open file dialog. While browsing around for a file, the OS is checking to see if there are any file-related extensions it needs to load in order to show you something. When the user presses "OK" or "Cancel" it stops searching for the extensions and spits that message to the console. I gather iOS may be doing something similar, perhaps related to share or other user-file-related activities. The message does not indicate an error in your application.

like image 118
user1118321 Avatar answered Oct 30 '22 19:10

user1118321