From 4e517c97efbf8f4caba0a981011500624550fc87 Mon Sep 17 00:00:00 2001 From: YK-Unit Date: Thu, 6 Mar 2014 15:22:25 +0800 Subject: [PATCH] fix bug:issue_2 fix bug:issue_2(https://github.com/newOcean/webrtc-ios/issues/2) to make sure onICEServers: method will be incoked before onOpen method in APPRTCAppDelegate. --- ios-example/AppRTCDemo/APPRTCAppClient.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios-example/AppRTCDemo/APPRTCAppClient.m b/ios-example/AppRTCDemo/APPRTCAppClient.m index 103f2b3..bb4cccc 100644 --- a/ios-example/AppRTCDemo/APPRTCAppClient.m +++ b/ios-example/AppRTCDemo/APPRTCAppClient.m @@ -242,6 +242,8 @@ - (void)updateICEServers:(NSMutableArray *)ICEServers dispatch_async(dispatch_get_main_queue(), ^(void) { [self.ICEServerDelegate onICEServers:ICEServers]; + + self.gaeChannel = [[GAEChannelClient alloc] initWithToken:self.token delegate:self.messageHandler]; }); }); } @@ -350,9 +352,8 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection { [self maybeLogMessage: [NSString stringWithFormat:@"About to open GAE with token: %@", self.token]]; - self.gaeChannel = - [[GAEChannelClient alloc] initWithToken:self.token - delegate:self.messageHandler]; + + //self.gaeChannel = [[GAEChannelClient alloc] initWithToken:self.token delegate:self.messageHandler]; } @end