Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building WebRtc on iOS

Tags:

ios

build

webrtc

I was successfully able to build WebRTC on MAC following these instructions: http://www.webrtc.org/reference/getting-started

Has anyone successfully built it on iOS? I understand that someone (arik) has successfully built it on iOS: https://groups.google.com/forum/#!msg/discuss-webrtc/VJg-fk2-i_0/dtG200DOzsgJ But the steps are not clear.

Can someone (who built on ios) summarize the steps so that it will be useful for everyone trying it in the future?

like image 606
ssk Avatar asked Mar 06 '13 20:03

ssk


People also ask

Does WebRTC work on iOS?

iOS. Unfortunately, WebRTC is not supported on iOS now. Although WebRTC works well on Mac when using Firefox, Opera, or Chrome, it is not supported on iOS. Nowadays, your WebRTC application won't work on Apple mobile devices out of the box.

Does iOS Safari support WebRTC?

Note: WebRTC Peer-to-peer connections is Not Supported on Safari 10, which means that any user who'd be accessing your page through Safari 10 can see it perfectly.


3 Answers

I wrote a detailed blog post with all of the instructions on how to build the WebRTC example iOS application, as well as how to run it on the iOS simulator or an actual iOS device. You can take a look here to read the details, it's a pretty lengthy process.

like image 148
jzn Avatar answered Oct 13 '22 01:10

jzn


Yes, compiling for iOS was a very painful task... especially getting it work in Xcode.

Here's my attempt to get AppRTC Demo for ios

Clone/Pull: https://github.com/pristineio/webrtc-build-scripts

After getting the repo, then open the xcode project within the ios directory. Set the target to WebRTC Dance, then execute. At this point the scripts will update depot_tools and do all the dirty work (pull, modify, build) so that your target for AppRTCDemo will able to resolve the missing files and execute.

Once that completes, you can change the target to AppRTC Demo with a simulator or a real device, click run and it should execute. There's more detailed information in the guide linked in there and updates in the readme.

If you are wondering what gets ran under the hood, check out the build.sh file in the ios directory of the git repo. The dance function is what's actually getting executed for you when you select WebRTC Dance.

Its not really easy to describe the build process (way too much going on) but the build scripts repo should definitely point you in the right direction and help you get AppRTCDemo on ios 'just work'

There's also a google developers video posted here, where they try and break down the build process so you can build for ios (the youtube title is misleading).

Also, I just added cocoapods support for ios webrtc, add this to your Podfile,

pod "libjingle_peerconnection"


# Add this to the bottom so it won't have issues with active architecture
post_install do |installer_representation|
    installer_representation.project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
            config.build_settings['VALID_ARCHS'] = ['armv7', 'i386']
        end
    end
end

Not all the revisions are built, so check out the the cocoadocs for which revisions are available

like image 34
thebehera Avatar answered Oct 12 '22 23:10

thebehera


I have been working in this space for the past few months now - webrtc on iOS is not easy. To help this problem I have added a github repo with a working example of and iOS app using webrtc.

https://github.com/gandg/webrtc-ios

The site references the google code site as well, so it should be a helpful starting point.

like image 22
gp-coder Avatar answered Oct 12 '22 23:10

gp-coder