issue-14-xpc icon indicating copy to clipboard operation
issue-14-xpc copied to clipboard

Is it necessary to get remote object using `remoteObjectProxyWithErrorHandler` before sending each message?

Open vojto opened this issue 9 years ago • 0 comments

Hi,

so from the source code it looks like you're getting object using this code before every message is sent:

let downloader = self.imageDownloadConnection.remoteObject as ImageDownloaderProtocol
downloader.downloadImageAtURL(url) {
    (data) in
    println("Got \(data.length) bytes.")
}

I was looking into Apple's AppSandboxLoginItemXPCDemo example, and what they did is that they only grabbed this object once and stored it as instance variable of app delegate.

I was wondering if any of these is the right or wrong way to do it, and if there's any particular reason why you always get object before sending a message.

Thanks!

vojto avatar Feb 03 '17 14:02 vojto