APPRTCDemo(objc): Remove regex parsing in favor of JSON struct.
Also some cleanup/refactoring of APPRTCAppClient.
R=fischman@webrtc.org, glaznev@webrtc.org
BUG=3407
Review URL: https://webrtc-codereview.appspot.com/18499004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6362 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/examples/objc/AppRTCDemo/GAEChannelClient.m b/talk/examples/objc/AppRTCDemo/GAEChannelClient.m
index 6146043..a95e99a 100644
--- a/talk/examples/objc/AppRTCDemo/GAEChannelClient.m
+++ b/talk/examples/objc/AppRTCDemo/GAEChannelClient.m
@@ -47,13 +47,14 @@
#endif
-@property(nonatomic, assign) id<GAEMessageHandler> delegate;
-
@end
@implementation GAEChannelClient
-- (id)initWithToken:(NSString*)token delegate:(id<GAEMessageHandler>)delegate {
+- (instancetype)initWithToken:(NSString*)token
+ delegate:(id<GAEMessageHandler>)delegate {
+ NSParameterAssert([token length] > 0);
+ NSParameterAssert(delegate);
self = [super init];
if (self) {
#if TARGET_OS_IPHONE
@@ -69,7 +70,6 @@
NSURL* htmlUrl = [NSURL fileURLWithPath:htmlPath];
NSString* path = [NSString
stringWithFormat:@"%@?token=%@", [htmlUrl absoluteString], token];
-
#if TARGET_OS_IPHONE
[_webView
#else