Files
SnakeAppleSecurityFiles/X. NU/custom/mach_ipc/client_server_NSConnection/client.m
T
2024-12-16 14:12:52 +01:00

18 lines
525 B
Objective-C

#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
if (argc != 2) {
NSLog(@"Usage: %s <message>", argv[0]);
return 1;
}
NSConnection *connection = [NSConnection connectionWithRegisteredName:@"com.crimson.message_service" host:nil];
id<NSObject> server = [connection rootProxy];
NSString *message = [NSString stringWithUTF8String:argv[1]];
[server handleMessage:message];
}
return 0;
}