Building WebRtc on iOS

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.


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


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.

Tags:

Ios

Build

Webrtc