title: Swift 4 errors encountered while discovering extensions - photo will not load on UI
body: <p>I am getting the following error message when I choose a photo from the photo library to populate a UIImageView in XCode 9.2: </p>
  
  <ul>
  <li>[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}</li>
  </ul>
  
  <p>The simulator is able to access the photo library and I am able to view the photos to make a selection, but when I click on the 'Choose' option to select a photo, the error is thrown and after the picker is dismissed the image is not populating the UIImageView.  </p>
  
  <p>I have searched Stack Overflow and am able to get rid of the error message if I do this step: From Xcode menu open: Product > Scheme > Edit Scheme > On your Environment Variables set OS_ACTIVITY_MODE in the value set disable.  However, this only gets rid of the error and does not fix the issue with my selected photo not populating the UIImageView.  I am new to Swift and Xcode and am stuck!  Please help!</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import UIKit
  
  class HomeVC: UIViewController, UINavigationControllerDelegate, 
  UIImagePickerControllerDelegate {
  
  @IBOutlet weak var avaImg: UIImageView!
  @IBOutlet weak var usernameLbl: UILabel!
  @IBOutlet weak var fullnameLbl: UILabel!
  @IBOutlet weak var emailLbl: UILabel!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      //get user details from user global var (from database)
      let username = (user!["username"] as? String)?.uppercased()
      let fullname = user!["fullname"] as? String
      let email = user!["email"] as? String
      let ava = user!["ava"] as? String
  
      //populate labels on view
      usernameLbl.text = username
      fullnameLbl.text = fullname
      emailLbl.text = email
  
  
  }
  
  @IBAction func edit_click(_ sender: AnyObject) {
  
      //select ava
      let picker = UIImagePickerController()
      picker.delegate = self
      picker.sourceType = UIImagePickerControllerSourceType.photoLibrary
      picker.allowsEditing = true
      self.present(picker, animated: true, completion: nil)
  
      //selected image
      func imagePickerController(_ picker: UIImagePickerController, 
      didFinishPickingMediaWithInfo info: [String : AnyObject]) {
          let image = info[UIImagePickerControllerEditedImage] as? 
             UIImage
          avaImg.image = image
  
          self.dismiss(animated: true, completion: nil)
          }
  
      }
  }
  </code></pre>