add some logging

APPLEMAIL-28
Volker Birk 2020-06-12 06:00:22 +02:00
parent f7372ef7c4
commit 2a84de8d69
2 changed files with 8 additions and 4 deletions

View File

@ -13,7 +13,6 @@
/// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
@interface pEpMacOSAdapter : NSObject <pEpMacOSAdapterProtocol>
@property (retain) NSXPCListenerEndpoint* clientEndpoint;
@property (retain) NSXPCConnection* clientConnection;
@end

View File

@ -20,13 +20,18 @@ static pEpUpdater* _updater = nil;
{
NSLog(@"subscribeForUpdate called");
_clientEndpoint = endpoint;
_clientConnection = [[NSXPCConnection alloc] initWithListenerEndpoint:_clientEndpoint];
_clientConnection = [[NSXPCConnection alloc] initWithListenerEndpoint:endpoint];
_clientConnection.remoteObjectInterface = [NSXPCInterface
interfaceWithProtocol:@protocol(pEpNotificationProtocol)];
_clientConnection.interruptionHandler = ^(){NSLog(@"interruption");};
_clientConnection.invalidationHandler = ^(){NSLog(@"invalidation");};
[_clientConnection resume];
pEpNotification* downloadNotification = [_clientConnection remoteObjectProxy];
pEpNotification* downloadNotification = [_clientConnection remoteObjectProxyWithErrorHandler:^(NSError*err) {
NSLog(@"%@", err);
}];
if (downloadNotification) {
if (!_updater) {
_updater = [[pEpUpdater alloc] initWithSubscriber:downloadNotification];