iOS - Unified Plan - ver 1.106.1 - PeerConnectionFactory does not return RTCPeerConnection instance

I have this JS code:

const pc = new RTCPeerConnection(configuration);
pcPeers[socketId] = pc;

pc.onicecandidate = function (event) {
	// ...

pc.onnegotiationneeded = function () {
	// ...

pc.oniceconnectionstatechange = function (event) {
	// ...
pc.onsignalingstatechange = function (event) {
	// ...

pc.onaddstream = function (event) {
	// ...

return pc;

pc.addStream will fail to add the stream to the PeerConnection. I dug deeper in objective-c code (I have no prior experience with objc) and I found out that WebRTCModule+RTCPeerConnection.m:96 does not create a peerConnection but returns null. I cannot “step into” this call.

RTCPeerConnection *peerConnection
            = [self.peerConnectionFactory peerConnectionWithConfiguration:configuration

Are you sure you’re running version 1.106.1 of the module?
Sounds more like you are running one of the new beta versions that removes addStream due to Unified Plan coming into service which replaces Plan B.

Have a look at addTrack and addTransceiver.

Yes, we have tried to upgrade to 1.106.1 because of unified plan (google play is now saying plan-b is not supported) - react-native-webrtc - npm

Should I update to today released 106.0.0-beta.8 ?

We’re working towards a stable release but yes, you should try the latest beta to have Unified Plan support.

Thank you very much.

Do you have any sort of schedule/roadmap for stable release?

There hasn’t been much discussion around that subject as of yet but hopefully soon :+1:

Seems i spoke too soon, the stable release has just gone out :smiley:

1 Like