- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
@autoreleasepool {
// Bridge Server Settings
NSDictionary* options = [NSDictionary dictionaryWithObjectsAndKeys:@"localhost", @"host", [NSNumber numberWithInt:8090], @"port", nil];
// Allocate Bridge Object
Bridge* bridge = [[Bridge alloc] initWithAPIKey:@"xxxxxxxxx" andDelegate:self options:options];
[bridge connect];
}
}
2012-09-07 14:45:12.170 Screecharama[7819:c07] Starting TCP connection localhost , 8090
But nothing more. However if I put
[[NSRunLoop currentRunLoop] run];
dispatch_main();
2012-09-07 14:49:58.581 Screecharama[7881:c07] Starting TCP connection localhost , 8090
2012-09-07 14:49:58.583 Screecharama[7881:c07] Beginning handshake
2012-09-07 14:49:58.584 Screecharama[7881:c07] {
command = CONNECT;
data = {
"api_key" = xxxxxx;
session = (
"<null>",
"<null>"
);
};
}
2012-09-07 14:49:58.584 Screecharama[7881:c07] sending: {"command":"CONNECT","data":{"api_key":"bnhnmhnbchjdhhcn","session":[null,null]}}
2012-09-07 14:49:58.585 Screecharama[7881:c07] Connect length: 33
2012-09-07 14:49:58.586 Screecharama[7881:c07] client_id received: ldliikgglbggjfkn
2012-09-07 14:49:58.586 Screecharama[7881:c07] Handshake complete
o but then my app doesn't actually start (i.e no ViewController is shown) Is there something special I need to do to run it through my ViewController?