[[NSRunLoop currentRunLoop] run];
Start the current runloop in -(void)initServer method.
-(void)initServer {
NSConnection * connection = [[NSConnection alloc]init];
MZRemoteObject * obj = [[MZRemoteObject alloc]init];
obj.message = @"hello world";
[connection setRootObject:obj];
if([connection registerName:@"server"]== NO){
NSLog(@"error Register Server");
}
NSLog(@"Registered Server");
[[NSRunLoop currentRunLoop] run];
}