On iOS latest webRTC checkout code framework output, we are getting error on calling
"setLocalDescription" API with error message "Error Domain=org.webrtc.RTCPeerConnection Code=-1 "SessionDescription is NULL." UserInfo={NSLocalizedDescription=SessionDescription is NULL.}".
On goggling this issue. Other people are also facing similar issue. According to discussion their is an issue in parsing of RTCSessionDescription
https://github.com/Anakros/WebRTC/issues/8/ Also in latest version many API is altered. It will be better to update Sample App for iOS with new API's
API:
- (void)setLocalDescription:(RTCSessionDescription *)sdp
completionHandler:
(nullable void (^)(NSError * _Nullable error))completionHandler;
API Called:
//To init SDP
(instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp
//To setLocalDescription
- (void)setLocalDescription:(RTCSessionDescription *)sdp
completionHandler:
(nullable void (^)(NSError * _Nullable error))completionHandler;
Output:
Error: "Error Domain=org.webrtc.RTCPeerConnection Code=-1 "SessionDescription is NULL." UserInfo={NSLocalizedDescription=SessionDescription is NULL.}"
Input:
SDP Data:
Printing description of rtcDesc:
RTCSessionDescription:
offer
RTCSessionDescription:
offer
v=0
o=- 2450450237825616902 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS B43EE499-9B5A-42DD-A437-4CAE04E6D1C5
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yd81
a=ice-pwd:zBEGCdaF7hAa+X+HOIqeof7a
a=fingerprint:sha-256 E0:47:FB:AC:21:98:07:16:AB:C0:07:F5:9D:76:42:D9:BF:2A:E8:FC:AD:85:68:B0:85:AC:D0:74:8A:39:9E:0C
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3
http://www.webrtc.org/experiments/rtp-hdrext/abs-send-timea=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=ssrc:766312134 cname:07fh/3TYR402or4P
a=ssrc:766312134 msid:B43EE499-9B5A-42DD-A437-4CAE04E6D1C5 0933F041-E98A-4054-BDA4-57CC84069256
a=ssrc:766312134 mslabel:B43EE499-9B5A-42DD-A437-4CAE04E6D1C5
a=ssrc:766312134 label:0933F041-E98A-4054-BDA4-57CC84069256