Apprtcdemo ios应用程序:断言失败 - [RTCICEServer initWithURI:用户名:密码:]

时间:2014-03-10 10:43:32

标签: ios webrtc

我使用了这个项目,即https://github.com/gandg/webrtc-ios。它编译得很好。但是进入房间后没有:我得到以下错误。如何纠正这个错误?

2014-03-10 15:58:01.421 AppRTCDemo[4159:907] *** Assertion failure in -[RTCICEServer initWithURI:username:password:], ../../../talk/app/webrtc/objc/RTCICEServer.mm:40
2014-03-10 15:58:01.438 AppRTCDemo[4159:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nil arguments not allowed'
*** First throw call stack:
(0x31dfe2a3 0x39a5897f 0x31dfe15d 0x326d3ab7 0x17e07b 0x1b717 0x327396fd 0x326791f9 0x32679115 0x31adb45f 0x31adab43 0x31b02fcb 0x31d4474d 0x31b0342b 0x31a6703d 0x31dd3683 0x31dd2ee9 0x31dd1cb7 0x31d44ebd 0x31d44d49 0x358c12eb 0x33c5a301 0x12a61 0x39e8fb20)
libc++abi.dylib: terminate called throwing an exception

帮助非常明显

提前致谢

1 个答案:

答案 0 :(得分:0)

终于找到了原因,在尝试创建RTCICEServer实例时,URI为nil。 要解决此问题,请导航到APPRTCAppClient.m文件 寻找

    - (void)connectionDidFinishLoading:(NSURLConnection *)connection method

在函数结束之前,你应该找到一个循环遍历服务器的枚举器 在该循环内更新以下行

    NSString *url = [server objectForKey:@"url"];

到这个

    NSString *url = [server objectForKey:@"urls"];

这应该有效!