I am trying to use PubNub as the signaling server for a webRTC iOS app. I am using Xirsys for the ICE servers. I have been able to get my app working with googles AppRTC framework, but I can't seem to find any good information on integrating with PubNub as the signaling server.What is the best way to integrate PubNub with webRTC on an iOS app? This app is writen in Swift/Obj-C Thanks!
2 Answers
PubNub as Signal Protocol
You are just going to integrate the PubNub JavaScript SDK into your app to signal (publish a message on a channel) from one client to the other the details of how to connect. This KB article may be helpful to you: Does PubNub provide WebRTC and video chat?

- 1
- 1

- 4,710
- 34
- 59
-
The app is written in swift, how can I integrate the JavaScript SDK with the app? – Alex Pelletier Jul 07 '17 at 21:53
-
Just use the JS as pseudocode and translate into "Swift-ese" – Craig Conover Jul 19 '17 at 20:45
-
Thats what I ended up doing. Then I just mimicked the js protocol to connect with a pubnub js client. – Alex Pelletier Jul 20 '17 at 12:53
-
@AlexPelletier do you have any gist or repo which Shows this, I stuck on this since weeks thanks :) – Jon not doe xx Jan 16 '19 at 12:13
-
Not really. This is pretty old though. Checkout [PubNub ChatEngine + WebRTC Plugin](https://www.pubnub.com/blog/webrtc-video-chat-engine-plugin-video-calling-chat/) – Craig Conover Jan 17 '19 at 18:41
Use Pubnub sdk - https://www.pubnub.com/docs/swift/pubnub-swift-sdk
It is available for both swift and Objective C.
You need to create your own steps for SDP and ICE Candidates signalling via Pubnub. Refer - https://www.tutorialspoint.com/webrtc/webrtc_signaling.htm
Or you can refer the sample webrtc iOS App just to see what message status they have maintained for signalling purpose. Refer - https://github.com/Mahabali/Apprtc-swift
You can make robust signalling process based on your app or project requirement.

- 658
- 8
- 18