1

I've got the following message in Xcode's Debug Area after importing an image in my app:

"[21950:1148196] Metadata.framework [Error]: couldn't get the client port".

How can I get rid of this error?

Here's my code for uploading a picture:

@IBAction func importButton(sender: AnyObject) {

    let uploadFile: NSOpenPanel = NSOpenPanel()

    uploadFile.allowsMultipleSelection = false
    uploadFile.canChooseFiles = true
    uploadFile.canChooseDirectories = false

    uploadFile.runModal()

    let chosenPicture = uploadFile.URL

        if(chosenPicture != nil) {

            let pictureImport = NSImage(contentsOfURL: chosenPicture!)
            imageWell.image = pictureImport
        }
}

1 Answer 1

1

I get this error message because I have Spotlight indexing disabled (so apps' and images' metadata is inaccessible).

After turning Spotlight automatic indexing ON the error message

"Metadata.framework [Error]: couldn't get the client port"

in Xcode's Debug Area disappears.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.