Created
October 21, 2013 17:55
-
-
Save tommetge/7088091 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launch_data_t req = launch_data_new_string(LAUNCH_KEY_CHECKIN); | |
launch_data_t resp = launch_msg(req); | |
launch_data_t machData = | |
launch_data_dict_lookup(resp, LAUNCH_JOBKEY_MACHSERVICES); | |
launch_data_t machPortData = | |
launch_data_dict_lookup(machData, "com.company.helper.mach"); | |
mach_port_t mp = launch_data_get_machport(machPortData); | |
launch_data_free(req); | |
launch_data_free(resp); | |
NSMachPort *rp = [[NSMachPort alloc] initWithMachPort:mp]; | |
NSConnection *c = [NSConnection connectionWithReceivePort:rp | |
sendPort:nil]; | |
[rp release]; | |
DistributedObje t obj = [[DistributedObject alloc] init]; | |
[c setRootObject:obj]; | |
[obj release]; | |
@try { | |
[[NSRunLoop currentRunLoop] run]; | |
} | |
@catch (NSException *exception) { | |
NSLog(@"Exception processing request: %@", exception); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment