mirror of
https://github.com/Karmaz95/Snake_Apple.git
synced 2026-06-04 17:48:01 +02:00
19 lines
538 B
Objective-C
19 lines
538 B
Objective-C
// client.m
|
|
#import <Foundation/Foundation.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
@autoreleasepool {
|
|
if (argc != 2) {
|
|
NSLog(@"Usage: %s <message>", argv[0]);
|
|
return 1;
|
|
}
|
|
|
|
NSString *message = [NSString stringWithUTF8String:argv[1]];
|
|
[[NSDistributedNotificationCenter defaultCenter]
|
|
postNotificationName:@"com.crimson.message_service"
|
|
object:nil
|
|
userInfo:@{@"message": message}
|
|
deliverImmediately:YES];
|
|
}
|
|
return 0;
|
|
} |