issue-14-xpc
issue-14-xpc copied to clipboard
Is it necessary to get remote object using `remoteObjectProxyWithErrorHandler` before sending each message?
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!