// // BloggenUploadHelperXPCDelegate.m // Bloggen // // Created by Davis Remmel on 2/14/14. // Copyright (c) 2014 Davis Remmel. All rights reserved. // #import "BloggenUploadHelperXPCDelegate.h" #import "BloggenUploadHelperUploader.h" @implementation BloggenUploadHelperXPCDelegate - (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConnection *)newConnection { // Sets exported object BloggenUploadHelperUploader *uploader = [[BloggenUploadHelperUploader alloc] init]; [newConnection setExportedObject:uploader]; // Sets exported interface NSXPCInterface *xpcInterface = [NSXPCInterface interfaceWithProtocol:@protocol(BloggenUploadHelperXPCProtocol)]; [newConnection setExportedInterface:xpcInterface]; // Calls resume [newConnection resume]; // Returns YES if accepting connection return YES; } @end