mirror of
https://github.com/Karmaz95/Snake_Apple.git
synced 2026-06-04 17:48:01 +02:00
18 lines
525 B
Objective-C
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;
|
|
}
|