Adds trunk/talk folder of revision 359 from libjingles google code to
trunk/talk
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4318 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/examples/ios/AppRTCDemo.xcodeproj/project.pbxproj b/talk/examples/ios/AppRTCDemo.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..72de3b4
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo.xcodeproj/project.pbxproj
@@ -0,0 +1,570 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 4F995B31173B6937007F179A /* libaudio_coding_module.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B01173B6937007F179A /* libaudio_coding_module.a */; };
+ 4F995B32173B6937007F179A /* libaudio_conference_mixer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B02173B6937007F179A /* libaudio_conference_mixer.a */; };
+ 4F995B33173B6937007F179A /* libaudio_device.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B03173B6937007F179A /* libaudio_device.a */; };
+ 4F995B34173B6938007F179A /* libaudio_processing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B04173B6937007F179A /* libaudio_processing.a */; };
+ 4F995B35173B6938007F179A /* libaudioproc_debug_proto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B05173B6937007F179A /* libaudioproc_debug_proto.a */; };
+ 4F995B36173B6938007F179A /* libbitrate_controller.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B06173B6937007F179A /* libbitrate_controller.a */; };
+ 4F995B37173B6938007F179A /* libCNG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B07173B6937007F179A /* libCNG.a */; };
+ 4F995B38173B6938007F179A /* libcommon_video.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B08173B6937007F179A /* libcommon_video.a */; };
+ 4F995B39173B6938007F179A /* libexpat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B09173B6937007F179A /* libexpat.a */; };
+ 4F995B3A173B6938007F179A /* libG711.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B0A173B6937007F179A /* libG711.a */; };
+ 4F995B3B173B6938007F179A /* libG722.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B0B173B6937007F179A /* libG722.a */; };
+ 4F995B3C173B6938007F179A /* libgunit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B0C173B6937007F179A /* libgunit.a */; };
+ 4F995B3D173B6938007F179A /* libiLBC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B0D173B6937007F179A /* libiLBC.a */; };
+ 4F995B3E173B6938007F179A /* libiSAC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B0E173B6937007F179A /* libiSAC.a */; };
+ 4F995B3F173B6938007F179A /* libiSACFix.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B0F173B6937007F179A /* libiSACFix.a */; };
+ 4F995B40173B6938007F179A /* libjingle_media.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B10173B6937007F179A /* libjingle_media.a */; };
+ 4F995B41173B6938007F179A /* libjingle_p2p.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B11173B6937007F179A /* libjingle_p2p.a */; };
+ 4F995B42173B6938007F179A /* libjingle_peerconnection_objc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B12173B6937007F179A /* libjingle_peerconnection_objc.a */; };
+ 4F995B43173B6938007F179A /* libjingle_peerconnection.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B13173B6937007F179A /* libjingle_peerconnection.a */; };
+ 4F995B44173B6938007F179A /* libjingle_sound.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B14173B6937007F179A /* libjingle_sound.a */; };
+ 4F995B45173B6938007F179A /* libjingle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B15173B6937007F179A /* libjingle.a */; };
+ 4F995B46173B6938007F179A /* libjsoncpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B16173B6937007F179A /* libjsoncpp.a */; };
+ 4F995B47173B6938007F179A /* libmedia_file.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B17173B6937007F179A /* libmedia_file.a */; };
+ 4F995B48173B6938007F179A /* libNetEq.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B18173B6937007F179A /* libNetEq.a */; };
+ 4F995B49173B6938007F179A /* libopenssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B19173B6937007F179A /* libopenssl.a */; };
+ 4F995B4A173B6938007F179A /* libopus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B1A173B6937007F179A /* libopus.a */; };
+ 4F995B4B173B6938007F179A /* libpaced_sender.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B1B173B6937007F179A /* libpaced_sender.a */; };
+ 4F995B4C173B6938007F179A /* libPCM16B.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B1C173B6937007F179A /* libPCM16B.a */; };
+ 4F995B4D173B6938007F179A /* libprotobuf_lite.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B1D173B6937007F179A /* libprotobuf_lite.a */; };
+ 4F995B4E173B6938007F179A /* libremote_bitrate_estimator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B1E173B6937007F179A /* libremote_bitrate_estimator.a */; };
+ 4F995B4F173B6938007F179A /* libresampler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B1F173B6937007F179A /* libresampler.a */; };
+ 4F995B50173B6938007F179A /* librtp_rtcp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B20173B6937007F179A /* librtp_rtcp.a */; };
+ 4F995B51173B6938007F179A /* libsignal_processing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B21173B6937007F179A /* libsignal_processing.a */; };
+ 4F995B52173B6938007F179A /* libsrtp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B22173B6937007F179A /* libsrtp.a */; };
+ 4F995B53173B6938007F179A /* libsystem_wrappers.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B23173B6937007F179A /* libsystem_wrappers.a */; };
+ 4F995B54173B6938007F179A /* libudp_transport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B24173B6937007F179A /* libudp_transport.a */; };
+ 4F995B55173B6938007F179A /* libvad.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B25173B6937007F179A /* libvad.a */; };
+ 4F995B56173B6938007F179A /* libvideo_capture_module.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B26173B6937007F179A /* libvideo_capture_module.a */; };
+ 4F995B57173B6938007F179A /* libvideo_coding_utility.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B27173B6937007F179A /* libvideo_coding_utility.a */; };
+ 4F995B58173B6938007F179A /* libvideo_engine_core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B28173B6937007F179A /* libvideo_engine_core.a */; };
+ 4F995B59173B6938007F179A /* libvideo_processing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B29173B6937007F179A /* libvideo_processing.a */; };
+ 4F995B5A173B6938007F179A /* libvideo_render_module.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B2A173B6937007F179A /* libvideo_render_module.a */; };
+ 4F995B5B173B6938007F179A /* libvoice_engine_core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B2B173B6937007F179A /* libvoice_engine_core.a */; };
+ 4F995B5C173B6938007F179A /* libwebrtc_i420.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B2C173B6937007F179A /* libwebrtc_i420.a */; };
+ 4F995B5D173B6938007F179A /* libwebrtc_opus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B2D173B6937007F179A /* libwebrtc_opus.a */; };
+ 4F995B5E173B6938007F179A /* libwebrtc_utility.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B2E173B6937007F179A /* libwebrtc_utility.a */; };
+ 4F995B5F173B6938007F179A /* libwebrtc_video_coding.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B2F173B6937007F179A /* libwebrtc_video_coding.a */; };
+ 4F995B60173B6938007F179A /* libwebrtc_vp8.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B30173B6937007F179A /* libwebrtc_vp8.a */; };
+ 4F995B62173B694B007F179A /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B61173B694B007F179A /* AVFoundation.framework */; };
+ 4F995B64173B6956007F179A /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B63173B6956007F179A /* CoreMedia.framework */; };
+ 4F995B66173B695C007F179A /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B65173B695C007F179A /* CoreVideo.framework */; };
+ 4F995B68173B6970007F179A /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B67173B6970007F179A /* CoreAudio.framework */; };
+ 4F995B91173C03A1007F179A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F995B90173C03A1007F179A /* AudioToolbox.framework */; };
+ 4F995B94173C0B82007F179A /* shim.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4F995B92173C0819007F179A /* shim.mm */; };
+ 4FBCC04F1728E929004C8C0B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FBCC04E1728E929004C8C0B /* UIKit.framework */; };
+ 4FBCC0511728E929004C8C0B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FBCC0501728E929004C8C0B /* Foundation.framework */; };
+ 4FBCC0531728E929004C8C0B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FBCC0521728E929004C8C0B /* CoreGraphics.framework */; };
+ 4FBCC05B1728E929004C8C0B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FBCC05A1728E929004C8C0B /* main.m */; };
+ 4FBCC05F1728E929004C8C0B /* APPRTCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FBCC05E1728E929004C8C0B /* APPRTCAppDelegate.m */; };
+ 4FBCC0611728E929004C8C0B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 4FBCC0601728E929004C8C0B /* Default.png */; };
+ 4FBCC0681728E929004C8C0B /* APPRTCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FBCC0671728E929004C8C0B /* APPRTCViewController.m */; };
+ 4FBCC06B1728E929004C8C0B /* APPRTCViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FBCC0691728E929004C8C0B /* APPRTCViewController.xib */; };
+ 4FBCC0731729B780004C8C0B /* GAEChannelClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FBCC0721729B780004C8C0B /* GAEChannelClient.m */; };
+ 4FD7F5011732E1C2009295E5 /* APPRTCAppClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FD7F5001732E1C2009295E5 /* APPRTCAppClient.m */; };
+ 4FEE3E531743C94D0005814A /* ios_channel.html in Resources */ = {isa = PBXBuildFile; fileRef = 4FEE3E511743C92D0005814A /* ios_channel.html */; };
+ 4FEE3EB71746A3810005814A /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 4FEE3EB61746A3810005814A /* Icon.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 4F995B01173B6937007F179A /* libaudio_coding_module.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libaudio_coding_module.a; path = libs/libaudio_coding_module.a; sourceTree = "<group>"; };
+ 4F995B02173B6937007F179A /* libaudio_conference_mixer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libaudio_conference_mixer.a; path = libs/libaudio_conference_mixer.a; sourceTree = "<group>"; };
+ 4F995B03173B6937007F179A /* libaudio_device.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libaudio_device.a; path = libs/libaudio_device.a; sourceTree = "<group>"; };
+ 4F995B04173B6937007F179A /* libaudio_processing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libaudio_processing.a; path = libs/libaudio_processing.a; sourceTree = "<group>"; };
+ 4F995B05173B6937007F179A /* libaudioproc_debug_proto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libaudioproc_debug_proto.a; path = libs/libaudioproc_debug_proto.a; sourceTree = "<group>"; };
+ 4F995B06173B6937007F179A /* libbitrate_controller.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbitrate_controller.a; path = libs/libbitrate_controller.a; sourceTree = "<group>"; };
+ 4F995B07173B6937007F179A /* libCNG.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCNG.a; path = libs/libCNG.a; sourceTree = "<group>"; };
+ 4F995B08173B6937007F179A /* libcommon_video.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcommon_video.a; path = libs/libcommon_video.a; sourceTree = "<group>"; };
+ 4F995B09173B6937007F179A /* libexpat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libexpat.a; path = libs/libexpat.a; sourceTree = "<group>"; };
+ 4F995B0A173B6937007F179A /* libG711.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libG711.a; path = libs/libG711.a; sourceTree = "<group>"; };
+ 4F995B0B173B6937007F179A /* libG722.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libG722.a; path = libs/libG722.a; sourceTree = "<group>"; };
+ 4F995B0C173B6937007F179A /* libgunit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgunit.a; path = libs/libgunit.a; sourceTree = "<group>"; };
+ 4F995B0D173B6937007F179A /* libiLBC.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libiLBC.a; path = libs/libiLBC.a; sourceTree = "<group>"; };
+ 4F995B0E173B6937007F179A /* libiSAC.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libiSAC.a; path = libs/libiSAC.a; sourceTree = "<group>"; };
+ 4F995B0F173B6937007F179A /* libiSACFix.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libiSACFix.a; path = libs/libiSACFix.a; sourceTree = "<group>"; };
+ 4F995B10173B6937007F179A /* libjingle_media.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjingle_media.a; path = libs/libjingle_media.a; sourceTree = "<group>"; };
+ 4F995B11173B6937007F179A /* libjingle_p2p.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjingle_p2p.a; path = libs/libjingle_p2p.a; sourceTree = "<group>"; };
+ 4F995B12173B6937007F179A /* libjingle_peerconnection_objc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjingle_peerconnection_objc.a; path = libs/libjingle_peerconnection_objc.a; sourceTree = "<group>"; };
+ 4F995B13173B6937007F179A /* libjingle_peerconnection.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjingle_peerconnection.a; path = libs/libjingle_peerconnection.a; sourceTree = "<group>"; };
+ 4F995B14173B6937007F179A /* libjingle_sound.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjingle_sound.a; path = libs/libjingle_sound.a; sourceTree = "<group>"; };
+ 4F995B15173B6937007F179A /* libjingle.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjingle.a; path = libs/libjingle.a; sourceTree = "<group>"; };
+ 4F995B16173B6937007F179A /* libjsoncpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjsoncpp.a; path = libs/libjsoncpp.a; sourceTree = "<group>"; };
+ 4F995B17173B6937007F179A /* libmedia_file.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmedia_file.a; path = libs/libmedia_file.a; sourceTree = "<group>"; };
+ 4F995B18173B6937007F179A /* libNetEq.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libNetEq.a; path = libs/libNetEq.a; sourceTree = "<group>"; };
+ 4F995B19173B6937007F179A /* libopenssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopenssl.a; path = libs/libopenssl.a; sourceTree = "<group>"; };
+ 4F995B1A173B6937007F179A /* libopus.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopus.a; path = libs/libopus.a; sourceTree = "<group>"; };
+ 4F995B1B173B6937007F179A /* libpaced_sender.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpaced_sender.a; path = libs/libpaced_sender.a; sourceTree = "<group>"; };
+ 4F995B1C173B6937007F179A /* libPCM16B.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPCM16B.a; path = libs/libPCM16B.a; sourceTree = "<group>"; };
+ 4F995B1D173B6937007F179A /* libprotobuf_lite.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libprotobuf_lite.a; path = libs/libprotobuf_lite.a; sourceTree = "<group>"; };
+ 4F995B1E173B6937007F179A /* libremote_bitrate_estimator.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libremote_bitrate_estimator.a; path = libs/libremote_bitrate_estimator.a; sourceTree = "<group>"; };
+ 4F995B1F173B6937007F179A /* libresampler.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libresampler.a; path = libs/libresampler.a; sourceTree = "<group>"; };
+ 4F995B20173B6937007F179A /* librtp_rtcp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = librtp_rtcp.a; path = libs/librtp_rtcp.a; sourceTree = "<group>"; };
+ 4F995B21173B6937007F179A /* libsignal_processing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsignal_processing.a; path = libs/libsignal_processing.a; sourceTree = "<group>"; };
+ 4F995B22173B6937007F179A /* libsrtp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsrtp.a; path = libs/libsrtp.a; sourceTree = "<group>"; };
+ 4F995B23173B6937007F179A /* libsystem_wrappers.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsystem_wrappers.a; path = libs/libsystem_wrappers.a; sourceTree = "<group>"; };
+ 4F995B24173B6937007F179A /* libudp_transport.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libudp_transport.a; path = libs/libudp_transport.a; sourceTree = "<group>"; };
+ 4F995B25173B6937007F179A /* libvad.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvad.a; path = libs/libvad.a; sourceTree = "<group>"; };
+ 4F995B26173B6937007F179A /* libvideo_capture_module.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvideo_capture_module.a; path = libs/libvideo_capture_module.a; sourceTree = "<group>"; };
+ 4F995B27173B6937007F179A /* libvideo_coding_utility.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvideo_coding_utility.a; path = libs/libvideo_coding_utility.a; sourceTree = "<group>"; };
+ 4F995B28173B6937007F179A /* libvideo_engine_core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvideo_engine_core.a; path = libs/libvideo_engine_core.a; sourceTree = "<group>"; };
+ 4F995B29173B6937007F179A /* libvideo_processing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvideo_processing.a; path = libs/libvideo_processing.a; sourceTree = "<group>"; };
+ 4F995B2A173B6937007F179A /* libvideo_render_module.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvideo_render_module.a; path = libs/libvideo_render_module.a; sourceTree = "<group>"; };
+ 4F995B2B173B6937007F179A /* libvoice_engine_core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvoice_engine_core.a; path = libs/libvoice_engine_core.a; sourceTree = "<group>"; };
+ 4F995B2C173B6937007F179A /* libwebrtc_i420.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebrtc_i420.a; path = libs/libwebrtc_i420.a; sourceTree = "<group>"; };
+ 4F995B2D173B6937007F179A /* libwebrtc_opus.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebrtc_opus.a; path = libs/libwebrtc_opus.a; sourceTree = "<group>"; };
+ 4F995B2E173B6937007F179A /* libwebrtc_utility.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebrtc_utility.a; path = libs/libwebrtc_utility.a; sourceTree = "<group>"; };
+ 4F995B2F173B6937007F179A /* libwebrtc_video_coding.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebrtc_video_coding.a; path = libs/libwebrtc_video_coding.a; sourceTree = "<group>"; };
+ 4F995B30173B6937007F179A /* libwebrtc_vp8.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebrtc_vp8.a; path = libs/libwebrtc_vp8.a; sourceTree = "<group>"; };
+ 4F995B61173B694B007F179A /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ 4F995B63173B6956007F179A /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+ 4F995B65173B695C007F179A /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
+ 4F995B67173B6970007F179A /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+ 4F995B90173C03A1007F179A /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ 4F995B92173C0819007F179A /* shim.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = shim.mm; path = ../../../app/webrtc/objctests/ios/shim.mm; sourceTree = "<group>"; };
+ 4FBCC04B1728E929004C8C0B /* AppRTCDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppRTCDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4FBCC04E1728E929004C8C0B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 4FBCC0501728E929004C8C0B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 4FBCC0521728E929004C8C0B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 4FBCC0561728E929004C8C0B /* AppRTCDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AppRTCDemo-Info.plist"; sourceTree = "<group>"; };
+ 4FBCC05A1728E929004C8C0B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 4FBCC05C1728E929004C8C0B /* AppRTCDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppRTCDemo-Prefix.pch"; sourceTree = "<group>"; };
+ 4FBCC05D1728E929004C8C0B /* APPRTCAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APPRTCAppDelegate.h; sourceTree = "<group>"; };
+ 4FBCC05E1728E929004C8C0B /* APPRTCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = APPRTCAppDelegate.m; sourceTree = "<group>"; };
+ 4FBCC0601728E929004C8C0B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 4FBCC0661728E929004C8C0B /* APPRTCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APPRTCViewController.h; sourceTree = "<group>"; };
+ 4FBCC0671728E929004C8C0B /* APPRTCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = APPRTCViewController.m; sourceTree = "<group>"; };
+ 4FBCC06A1728E929004C8C0B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/APPRTCViewController.xib; sourceTree = "<group>"; };
+ 4FBCC0711729B780004C8C0B /* GAEChannelClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GAEChannelClient.h; sourceTree = "<group>"; };
+ 4FBCC0721729B780004C8C0B /* GAEChannelClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GAEChannelClient.m; sourceTree = "<group>"; };
+ 4FD7F4FF1732E1C1009295E5 /* APPRTCAppClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APPRTCAppClient.h; sourceTree = "<group>"; };
+ 4FD7F5001732E1C2009295E5 /* APPRTCAppClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APPRTCAppClient.m; sourceTree = "<group>"; };
+ 4FEE3E511743C92D0005814A /* ios_channel.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ios_channel.html; sourceTree = "<group>"; };
+ 4FEE3EB61746A3810005814A /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../Icon.png; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 4FBCC0481728E929004C8C0B /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4F995B91173C03A1007F179A /* AudioToolbox.framework in Frameworks */,
+ 4F995B62173B694B007F179A /* AVFoundation.framework in Frameworks */,
+ 4F995B68173B6970007F179A /* CoreAudio.framework in Frameworks */,
+ 4FBCC0531728E929004C8C0B /* CoreGraphics.framework in Frameworks */,
+ 4F995B64173B6956007F179A /* CoreMedia.framework in Frameworks */,
+ 4F995B66173B695C007F179A /* CoreVideo.framework in Frameworks */,
+ 4FBCC0511728E929004C8C0B /* Foundation.framework in Frameworks */,
+ 4FBCC04F1728E929004C8C0B /* UIKit.framework in Frameworks */,
+ 4F995B31173B6937007F179A /* libaudio_coding_module.a in Frameworks */,
+ 4F995B32173B6937007F179A /* libaudio_conference_mixer.a in Frameworks */,
+ 4F995B33173B6937007F179A /* libaudio_device.a in Frameworks */,
+ 4F995B34173B6938007F179A /* libaudio_processing.a in Frameworks */,
+ 4F995B35173B6938007F179A /* libaudioproc_debug_proto.a in Frameworks */,
+ 4F995B36173B6938007F179A /* libbitrate_controller.a in Frameworks */,
+ 4F995B37173B6938007F179A /* libCNG.a in Frameworks */,
+ 4F995B38173B6938007F179A /* libcommon_video.a in Frameworks */,
+ 4F995B39173B6938007F179A /* libexpat.a in Frameworks */,
+ 4F995B3A173B6938007F179A /* libG711.a in Frameworks */,
+ 4F995B3B173B6938007F179A /* libG722.a in Frameworks */,
+ 4F995B3C173B6938007F179A /* libgunit.a in Frameworks */,
+ 4F995B3D173B6938007F179A /* libiLBC.a in Frameworks */,
+ 4F995B3E173B6938007F179A /* libiSAC.a in Frameworks */,
+ 4F995B40173B6938007F179A /* libjingle_media.a in Frameworks */,
+ 4F995B41173B6938007F179A /* libjingle_p2p.a in Frameworks */,
+ 4F995B42173B6938007F179A /* libjingle_peerconnection_objc.a in Frameworks */,
+ 4F995B43173B6938007F179A /* libjingle_peerconnection.a in Frameworks */,
+ 4F995B44173B6938007F179A /* libjingle_sound.a in Frameworks */,
+ 4F995B45173B6938007F179A /* libjingle.a in Frameworks */,
+ 4F995B46173B6938007F179A /* libjsoncpp.a in Frameworks */,
+ 4F995B47173B6938007F179A /* libmedia_file.a in Frameworks */,
+ 4F995B48173B6938007F179A /* libNetEq.a in Frameworks */,
+ 4F995B49173B6938007F179A /* libopenssl.a in Frameworks */,
+ 4F995B4A173B6938007F179A /* libopus.a in Frameworks */,
+ 4F995B4B173B6938007F179A /* libpaced_sender.a in Frameworks */,
+ 4F995B4C173B6938007F179A /* libPCM16B.a in Frameworks */,
+ 4F995B4D173B6938007F179A /* libprotobuf_lite.a in Frameworks */,
+ 4F995B4E173B6938007F179A /* libremote_bitrate_estimator.a in Frameworks */,
+ 4F995B4F173B6938007F179A /* libresampler.a in Frameworks */,
+ 4F995B50173B6938007F179A /* librtp_rtcp.a in Frameworks */,
+ 4F995B51173B6938007F179A /* libsignal_processing.a in Frameworks */,
+ 4F995B52173B6938007F179A /* libsrtp.a in Frameworks */,
+ 4F995B53173B6938007F179A /* libsystem_wrappers.a in Frameworks */,
+ 4F995B54173B6938007F179A /* libudp_transport.a in Frameworks */,
+ 4F995B55173B6938007F179A /* libvad.a in Frameworks */,
+ 4F995B56173B6938007F179A /* libvideo_capture_module.a in Frameworks */,
+ 4F995B57173B6938007F179A /* libvideo_coding_utility.a in Frameworks */,
+ 4F995B58173B6938007F179A /* libvideo_engine_core.a in Frameworks */,
+ 4F995B59173B6938007F179A /* libvideo_processing.a in Frameworks */,
+ 4F995B5A173B6938007F179A /* libvideo_render_module.a in Frameworks */,
+ 4F995B5B173B6938007F179A /* libvoice_engine_core.a in Frameworks */,
+ 4F995B5C173B6938007F179A /* libwebrtc_i420.a in Frameworks */,
+ 4F995B5D173B6938007F179A /* libwebrtc_opus.a in Frameworks */,
+ 4F995B5E173B6938007F179A /* libwebrtc_utility.a in Frameworks */,
+ 4F995B5F173B6938007F179A /* libwebrtc_video_coding.a in Frameworks */,
+ 4F995B60173B6938007F179A /* libwebrtc_vp8.a in Frameworks */,
+ 4F995B3F173B6938007F179A /* libiSACFix.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 4F1CC122172F52E50090479F /* libs */ = {
+ isa = PBXGroup;
+ children = (
+ 4F995B01173B6937007F179A /* libaudio_coding_module.a */,
+ 4F995B02173B6937007F179A /* libaudio_conference_mixer.a */,
+ 4F995B03173B6937007F179A /* libaudio_device.a */,
+ 4F995B04173B6937007F179A /* libaudio_processing.a */,
+ 4F995B05173B6937007F179A /* libaudioproc_debug_proto.a */,
+ 4F995B06173B6937007F179A /* libbitrate_controller.a */,
+ 4F995B07173B6937007F179A /* libCNG.a */,
+ 4F995B08173B6937007F179A /* libcommon_video.a */,
+ 4F995B09173B6937007F179A /* libexpat.a */,
+ 4F995B0A173B6937007F179A /* libG711.a */,
+ 4F995B0B173B6937007F179A /* libG722.a */,
+ 4F995B0C173B6937007F179A /* libgunit.a */,
+ 4F995B0D173B6937007F179A /* libiLBC.a */,
+ 4F995B0E173B6937007F179A /* libiSAC.a */,
+ 4F995B0F173B6937007F179A /* libiSACFix.a */,
+ 4F995B10173B6937007F179A /* libjingle_media.a */,
+ 4F995B11173B6937007F179A /* libjingle_p2p.a */,
+ 4F995B12173B6937007F179A /* libjingle_peerconnection_objc.a */,
+ 4F995B13173B6937007F179A /* libjingle_peerconnection.a */,
+ 4F995B14173B6937007F179A /* libjingle_sound.a */,
+ 4F995B15173B6937007F179A /* libjingle.a */,
+ 4F995B16173B6937007F179A /* libjsoncpp.a */,
+ 4F995B17173B6937007F179A /* libmedia_file.a */,
+ 4F995B18173B6937007F179A /* libNetEq.a */,
+ 4F995B19173B6937007F179A /* libopenssl.a */,
+ 4F995B1A173B6937007F179A /* libopus.a */,
+ 4F995B1B173B6937007F179A /* libpaced_sender.a */,
+ 4F995B1C173B6937007F179A /* libPCM16B.a */,
+ 4F995B1D173B6937007F179A /* libprotobuf_lite.a */,
+ 4F995B1E173B6937007F179A /* libremote_bitrate_estimator.a */,
+ 4F995B1F173B6937007F179A /* libresampler.a */,
+ 4F995B20173B6937007F179A /* librtp_rtcp.a */,
+ 4F995B21173B6937007F179A /* libsignal_processing.a */,
+ 4F995B22173B6937007F179A /* libsrtp.a */,
+ 4F995B23173B6937007F179A /* libsystem_wrappers.a */,
+ 4F995B24173B6937007F179A /* libudp_transport.a */,
+ 4F995B25173B6937007F179A /* libvad.a */,
+ 4F995B26173B6937007F179A /* libvideo_capture_module.a */,
+ 4F995B27173B6937007F179A /* libvideo_coding_utility.a */,
+ 4F995B28173B6937007F179A /* libvideo_engine_core.a */,
+ 4F995B29173B6937007F179A /* libvideo_processing.a */,
+ 4F995B2A173B6937007F179A /* libvideo_render_module.a */,
+ 4F995B2B173B6937007F179A /* libvoice_engine_core.a */,
+ 4F995B2C173B6937007F179A /* libwebrtc_i420.a */,
+ 4F995B2D173B6937007F179A /* libwebrtc_opus.a */,
+ 4F995B2E173B6937007F179A /* libwebrtc_utility.a */,
+ 4F995B2F173B6937007F179A /* libwebrtc_video_coding.a */,
+ 4F995B30173B6937007F179A /* libwebrtc_vp8.a */,
+ );
+ name = libs;
+ sourceTree = "<group>";
+ };
+ 4FBCC0421728E929004C8C0B = {
+ isa = PBXGroup;
+ children = (
+ 4FBCC0541728E929004C8C0B /* AppRTCDemo */,
+ 4FBCC04D1728E929004C8C0B /* Frameworks */,
+ 4F1CC122172F52E50090479F /* libs */,
+ 4FBCC04C1728E929004C8C0B /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 4FBCC04C1728E929004C8C0B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 4FBCC04B1728E929004C8C0B /* AppRTCDemo.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 4FBCC04D1728E929004C8C0B /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 4F995B90173C03A1007F179A /* AudioToolbox.framework */,
+ 4F995B61173B694B007F179A /* AVFoundation.framework */,
+ 4F995B67173B6970007F179A /* CoreAudio.framework */,
+ 4FBCC0521728E929004C8C0B /* CoreGraphics.framework */,
+ 4F995B63173B6956007F179A /* CoreMedia.framework */,
+ 4F995B65173B695C007F179A /* CoreVideo.framework */,
+ 4FBCC0501728E929004C8C0B /* Foundation.framework */,
+ 4FBCC04E1728E929004C8C0B /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 4FBCC0541728E929004C8C0B /* AppRTCDemo */ = {
+ isa = PBXGroup;
+ children = (
+ 4FBCC0711729B780004C8C0B /* GAEChannelClient.h */,
+ 4FBCC0721729B780004C8C0B /* GAEChannelClient.m */,
+ 4FD7F4FF1732E1C1009295E5 /* APPRTCAppClient.h */,
+ 4FD7F5001732E1C2009295E5 /* APPRTCAppClient.m */,
+ 4FBCC05D1728E929004C8C0B /* APPRTCAppDelegate.h */,
+ 4FBCC05E1728E929004C8C0B /* APPRTCAppDelegate.m */,
+ 4FBCC0661728E929004C8C0B /* APPRTCViewController.h */,
+ 4FBCC0671728E929004C8C0B /* APPRTCViewController.m */,
+ 4FBCC0691728E929004C8C0B /* APPRTCViewController.xib */,
+ 4FBCC0551728E929004C8C0B /* Supporting Files */,
+ );
+ path = AppRTCDemo;
+ sourceTree = "<group>";
+ };
+ 4FBCC0551728E929004C8C0B /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 4FBCC0561728E929004C8C0B /* AppRTCDemo-Info.plist */,
+ 4FBCC05C1728E929004C8C0B /* AppRTCDemo-Prefix.pch */,
+ 4FBCC0601728E929004C8C0B /* Default.png */,
+ 4FEE3EB61746A3810005814A /* Icon.png */,
+ 4FEE3E511743C92D0005814A /* ios_channel.html */,
+ 4FBCC05A1728E929004C8C0B /* main.m */,
+ 4F995B92173C0819007F179A /* shim.mm */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 4FBCC04A1728E929004C8C0B /* AppRTCDemo */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4FBCC06E1728E929004C8C0B /* Build configuration list for PBXNativeTarget "AppRTCDemo" */;
+ buildPhases = (
+ 4FBCC0471728E929004C8C0B /* Sources */,
+ 4FBCC0481728E929004C8C0B /* Frameworks */,
+ 4FBCC0491728E929004C8C0B /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = AppRTCDemo;
+ productName = AppRTCDemo;
+ productReference = 4FBCC04B1728E929004C8C0B /* AppRTCDemo.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 4FBCC0431728E929004C8C0B /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = RTC;
+ LastUpgradeCheck = 0460;
+ ORGANIZATIONNAME = Google;
+ };
+ buildConfigurationList = 4FBCC0461728E929004C8C0B /* Build configuration list for PBXProject "AppRTCDemo" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 4FBCC0421728E929004C8C0B;
+ productRefGroup = 4FBCC04C1728E929004C8C0B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 4FBCC04A1728E929004C8C0B /* AppRTCDemo */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 4FBCC0491728E929004C8C0B /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4FEE3E531743C94D0005814A /* ios_channel.html in Resources */,
+ 4FBCC0611728E929004C8C0B /* Default.png in Resources */,
+ 4FBCC06B1728E929004C8C0B /* APPRTCViewController.xib in Resources */,
+ 4FEE3EB71746A3810005814A /* Icon.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 4FBCC0471728E929004C8C0B /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4FBCC05B1728E929004C8C0B /* main.m in Sources */,
+ 4FBCC05F1728E929004C8C0B /* APPRTCAppDelegate.m in Sources */,
+ 4FBCC0681728E929004C8C0B /* APPRTCViewController.m in Sources */,
+ 4FBCC0731729B780004C8C0B /* GAEChannelClient.m in Sources */,
+ 4FD7F5011732E1C2009295E5 /* APPRTCAppClient.m in Sources */,
+ 4F995B94173C0B82007F179A /* shim.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 4FBCC0691728E929004C8C0B /* APPRTCViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 4FBCC06A1728E929004C8C0B /* en */,
+ );
+ name = APPRTCViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 4FBCC06C1728E929004C8C0B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 4FBCC06D1728E929004C8C0B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 4FBCC06F1728E929004C8C0B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+ CLANG_CXX_LIBRARY = "compiler-default";
+ GCC_CW_ASM_SYNTAX = NO;
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_ENABLE_CPP_EXCEPTIONS = NO;
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "AppRTCDemo/AppRTCDemo-Prefix.pch";
+ GCC_THREADSAFE_STATICS = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ HEADER_SEARCH_PATHS = (
+ ../../app/webrtc/objc/public,
+ ../../..,
+ );
+ INFOPLIST_FILE = "AppRTCDemo/AppRTCDemo-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/libs\"",
+ );
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ VALID_ARCHS = "armv7 i386";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 4FBCC0701728E929004C8C0B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+ CLANG_CXX_LIBRARY = "compiler-default";
+ GCC_CW_ASM_SYNTAX = NO;
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_ENABLE_CPP_EXCEPTIONS = NO;
+ GCC_ENABLE_CPP_RTTI = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "AppRTCDemo/AppRTCDemo-Prefix.pch";
+ GCC_THREADSAFE_STATICS = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ HEADER_SEARCH_PATHS = (
+ ../../app/webrtc/objc/public,
+ ../../..,
+ );
+ INFOPLIST_FILE = "AppRTCDemo/AppRTCDemo-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/libs\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ VALID_ARCHS = "armv7 i386";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4FBCC0461728E929004C8C0B /* Build configuration list for PBXProject "AppRTCDemo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4FBCC06C1728E929004C8C0B /* Debug */,
+ 4FBCC06D1728E929004C8C0B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 4FBCC06E1728E929004C8C0B /* Build configuration list for PBXNativeTarget "AppRTCDemo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4FBCC06F1728E929004C8C0B /* Debug */,
+ 4FBCC0701728E929004C8C0B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 4FBCC0431728E929004C8C0B /* Project object */;
+}
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCAppClient.h b/talk/examples/ios/AppRTCDemo/APPRTCAppClient.h
new file mode 100644
index 0000000..cac2f17
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/APPRTCAppClient.h
@@ -0,0 +1,54 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+#import "GAEChannelClient.h"
+
+// Called when there are RTCIceServers.
+@protocol IceServerDelegate <NSObject>
+
+- (void)onIceServers:(NSArray *)servers;
+
+@end
+
+// Negotiates signaling for chatting with apprtc.appspot.com "rooms".
+// Uses the client<->server specifics of the apprtc AppEngine webapp.
+//
+// To use: create an instance of this object (registering a message handler) and
+// call connectToRoom(). apprtc.appspot.com will signal that is successful via
+// onOpen through the browser channel. Then you should call sendData() and wait
+// for the registered handler to be called with received messages.
+@interface APPRTCAppClient : NSObject<NSURLConnectionDataDelegate>
+
+@property(nonatomic, assign) id<IceServerDelegate>iceServerDelegate;
+@property(nonatomic, assign) id<GAEMessageHandler>messageHandler;
+
+- (void)connectToRoom:(NSURL *)room;
+- (void)sendData:(NSData *)data;
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m b/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m
new file mode 100644
index 0000000..bcc2329
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/APPRTCAppClient.m
@@ -0,0 +1,333 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "APPRTCAppClient.h"
+
+#import <dispatch/dispatch.h>
+
+#import "GAEChannelClient.h"
+#import "RTCIceServer.h"
+
+@interface APPRTCAppClient ()
+
+@property(nonatomic, strong) dispatch_queue_t backgroundQueue;
+@property(nonatomic, copy) NSString *baseURL;
+@property(nonatomic, strong) GAEChannelClient *gaeChannel;
+@property(nonatomic, copy) NSString *postMessageUrl;
+@property(nonatomic, copy) NSString *pcConfig;
+@property(nonatomic, strong) NSMutableString *receivedData;
+@property(atomic, strong) NSMutableArray *sendQueue;
+@property(nonatomic, copy) NSString *token;
+
+@property(nonatomic, assign) BOOL verboseLogging;
+
+@end
+
+@implementation APPRTCAppClient
+
+- (id)init {
+ if (self = [super init]) {
+ _backgroundQueue = dispatch_queue_create("RTCBackgroundQueue", NULL);
+ _sendQueue = [NSMutableArray array];
+ // Uncomment to see Request/Response logging.
+ //_verboseLogging = YES;
+ }
+ return self;
+}
+
+#pragma mark - Public methods
+
+- (void)connectToRoom:(NSURL *)url {
+ NSURLRequest *request = [self getRequestFromUrl:url];
+ [NSURLConnection connectionWithRequest:request delegate:self];
+}
+
+- (void)sendData:(NSData *)data {
+ @synchronized(self) {
+ [self maybeLogMessage:@"Send message"];
+ [self.sendQueue addObject:[data copy]];
+ }
+ [self requestQueueDrainInBackground];
+}
+
+#pragma mark - Internal methods
+
+- (NSTextCheckingResult *)findMatch:(NSString *)regexpPattern
+ withString:(NSString *)string
+ errorMessage:(NSString *)errorMessage {
+ NSError *error;
+ NSRegularExpression *regexp =
+ [NSRegularExpression regularExpressionWithPattern:regexpPattern
+ options:0
+ error:&error];
+ if (error) {
+ [self maybeLogMessage:
+ [NSString stringWithFormat:@"Failed to create regexp - %@",
+ [error description]]];
+ return nil;
+ }
+ NSRange fullRange = NSMakeRange(0, [string length]);
+ NSArray *matches = [regexp matchesInString:string options:0 range:fullRange];
+ if ([matches count] == 0) {
+ if ([errorMessage length] > 0) {
+ [self maybeLogMessage:string];
+ [self showMessage:
+ [NSString stringWithFormat:@"Missing %@ in HTML.", errorMessage]];
+ }
+ return nil;
+ } else if ([matches count] > 1) {
+ if ([errorMessage length] > 0) {
+ [self maybeLogMessage:string];
+ [self showMessage:[NSString stringWithFormat:@"Too many %@s in HTML.",
+ errorMessage]];
+ }
+ return nil;
+ }
+ return matches[0];
+}
+
+- (NSURLRequest *)getRequestFromUrl:(NSURL *)url {
+ self.receivedData = [NSMutableString stringWithCapacity:20000];
+ NSString *path =
+ [NSString stringWithFormat:@"https:%@", [url resourceSpecifier]];
+ NSURLRequest *request =
+ [NSURLRequest requestWithURL:[NSURL URLWithString:path]];
+ return request;
+}
+
+- (void)maybeLogMessage:(NSString *)message {
+ if (self.verboseLogging) {
+ NSLog(@"%@", message);
+ }
+}
+
+- (void)requestQueueDrainInBackground {
+ dispatch_async(self.backgroundQueue, ^(void) {
+ // TODO(hughv): This can block the UI thread. Fix.
+ @synchronized(self) {
+ if ([self.postMessageUrl length] < 1) {
+ return;
+ }
+ for (NSData *data in self.sendQueue) {
+ NSString *url = [NSString stringWithFormat:@"%@/%@",
+ self.baseURL,
+ self.postMessageUrl];
+ [self sendData:data withUrl:url];
+ }
+ [self.sendQueue removeAllObjects];
+ }
+ });
+}
+
+- (void)sendData:(NSData *)data withUrl:(NSString *)url {
+ NSMutableURLRequest *request =
+ [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
+ request.HTTPMethod = @"POST";
+ [request setHTTPBody:data];
+ NSURLResponse *response;
+ NSError *error;
+ NSData *responseData = [NSURLConnection sendSynchronousRequest:request
+ returningResponse:&response
+ error:&error];
+ NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
+ int status = [httpResponse statusCode];
+ NSAssert(status == 200,
+ @"Bad response [%d] to message: %@\n\n%@",
+ status,
+ [NSString stringWithUTF8String:[data bytes]],
+ [NSString stringWithUTF8String:[responseData bytes]]);
+}
+
+- (void)showMessage:(NSString *)message {
+ NSLog(@"%@", message);
+ UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Unable to join"
+ message:message
+ delegate:nil
+ cancelButtonTitle:@"OK"
+ otherButtonTitles:nil];
+ [alertView show];
+}
+
+- (void)updateIceServers:(NSMutableArray *)iceServers
+ withTurnServer:(NSString *)turnServerUrl {
+ if ([turnServerUrl length] < 1) {
+ [self.iceServerDelegate onIceServers:iceServers];
+ return;
+ }
+ dispatch_async(self.backgroundQueue, ^(void) {
+ NSMutableURLRequest *request = [NSMutableURLRequest
+ requestWithURL:[NSURL URLWithString:turnServerUrl]];
+ [request addValue:@"Mozilla/5.0" forHTTPHeaderField:@"user-agent"];
+ [request addValue:@"https://apprtc.appspot.com"
+ forHTTPHeaderField:@"origin"];
+ NSURLResponse *response;
+ NSError *error;
+ NSData *responseData = [NSURLConnection sendSynchronousRequest:request
+ returningResponse:&response
+ error:&error];
+ if (!error) {
+ NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData
+ options:0
+ error:&error];
+ NSAssert(!error, @"Unable to parse. %@", error.localizedDescription);
+ NSString *username = json[@"username"];
+ NSString *turnServer = json[@"turn"];
+ NSString *password = json[@"password"];
+ NSString *fullUrl =
+ [NSString stringWithFormat:@"turn:%@@%@", username, turnServer];
+ RTCIceServer *iceServer =
+ [[RTCIceServer alloc] initWithUri:[NSURL URLWithString:fullUrl]
+ password:password];
+ [iceServers addObject:iceServer];
+ } else {
+ NSLog(@"Unable to get TURN server. Error: %@", error.description);
+ }
+
+ dispatch_async(dispatch_get_main_queue(), ^(void) {
+ [self.iceServerDelegate onIceServers:iceServers];
+ });
+ });
+}
+
+#pragma mark - NSURLConnectionDataDelegate methods
+
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
+ NSString *roomHtml = [NSString stringWithUTF8String:[data bytes]];
+ [self maybeLogMessage:
+ [NSString stringWithFormat:@"Received %d chars", [roomHtml length]]];
+ [self.receivedData appendString:roomHtml];
+}
+
+- (void)connection:(NSURLConnection *)connection
+ didReceiveResponse:(NSURLResponse *)response {
+ NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
+ int statusCode = [httpResponse statusCode];
+ [self maybeLogMessage:
+ [NSString stringWithFormat:
+ @"Response received\nURL\n%@\nStatus [%d]\nHeaders\n%@",
+ [httpResponse URL],
+ statusCode,
+ [httpResponse allHeaderFields]]];
+ NSAssert(statusCode == 200, @"Invalid response of %d received.", statusCode);
+}
+
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
+ [self maybeLogMessage:[NSString stringWithFormat:@"finished loading %d chars",
+ [self.receivedData length]]];
+ NSTextCheckingResult *result =
+ [self findMatch:@".*\n *Sorry, this room is full\\..*"
+ withString:self.receivedData
+ errorMessage:nil];
+ if (result) {
+ [self showMessage:@"Room full"];
+ return;
+ }
+
+ NSString *fullUrl = [[[connection originalRequest] URL] absoluteString];
+ NSRange queryRange = [fullUrl rangeOfString:@"?"];
+ self.baseURL = [fullUrl substringToIndex:queryRange.location];
+ [self maybeLogMessage:[NSString stringWithFormat:@"URL\n%@", self.baseURL]];
+
+ result = [self findMatch:@".*\n *openChannel\\('([^']*)'\\);\n.*"
+ withString:self.receivedData
+ errorMessage:@"channel token"];
+ if (!result) {
+ return;
+ }
+ self.token = [self.receivedData substringWithRange:[result rangeAtIndex:1]];
+ [self maybeLogMessage:[NSString stringWithFormat:@"Token\n%@", self.token]];
+
+ result =
+ [self findMatch:@".*\n *path = '/(message\\?r=.+)' \\+ '(&u=[0-9]+)';\n.*"
+ withString:self.receivedData
+ errorMessage:@"postMessage URL"];
+ if (!result) {
+ return;
+ }
+ self.postMessageUrl =
+ [NSString stringWithFormat:@"%@%@",
+ [self.receivedData substringWithRange:[result rangeAtIndex:1]],
+ [self.receivedData substringWithRange:[result rangeAtIndex:2]]];
+ [self maybeLogMessage:[NSString stringWithFormat:@"POST message URL\n%@",
+ self.postMessageUrl]];
+
+ result = [self findMatch:@".*\n *var pc_config = (\\{[^\n]*\\});\n.*"
+ withString:self.receivedData
+ errorMessage:@"pc_config"];
+ if (!result) {
+ return;
+ }
+ NSString *pcConfig =
+ [self.receivedData substringWithRange:[result rangeAtIndex:1]];
+ [self maybeLogMessage:
+ [NSString stringWithFormat:@"PC Config JSON\n%@", pcConfig]];
+
+ result = [self findMatch:@".*\n *requestTurn\\('([^\n]*)'\\);\n.*"
+ withString:self.receivedData
+ errorMessage:@"channel token"];
+ NSString *turnServerUrl;
+ if (result) {
+ turnServerUrl =
+ [self.receivedData substringWithRange:[result rangeAtIndex:1]];
+ [self maybeLogMessage:
+ [NSString stringWithFormat:@"TURN server request URL\n%@",
+ turnServerUrl]];
+ }
+
+ NSError *error;
+ NSData *pcData = [pcConfig dataUsingEncoding:NSUTF8StringEncoding];
+ NSDictionary *json =
+ [NSJSONSerialization JSONObjectWithData:pcData options:0 error:&error];
+ NSAssert(!error, @"Unable to parse. %@", error.localizedDescription);
+ NSArray *servers = [json objectForKey:@"iceServers"];
+ NSMutableArray *iceServers = [NSMutableArray array];
+ for (NSDictionary *server in servers) {
+ NSString *url = [server objectForKey:@"url"];
+ NSString *credential = [server objectForKey:@"credential"];
+ if (!credential) {
+ credential = @"";
+ }
+ [self maybeLogMessage:
+ [NSString stringWithFormat:@"url [%@] - credential [%@]",
+ url,
+ credential]];
+ RTCIceServer *iceServer =
+ [[RTCIceServer alloc] initWithUri:[NSURL URLWithString:url]
+ password:credential];
+ [iceServers addObject:iceServer];
+ }
+ [self updateIceServers:iceServers withTurnServer:turnServerUrl];
+
+ [self maybeLogMessage:
+ [NSString stringWithFormat:@"About to open GAE with token: %@",
+ self.token]];
+ self.gaeChannel =
+ [[GAEChannelClient alloc] initWithToken:self.token
+ delegate:self.messageHandler];
+}
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.h b/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.h
new file mode 100644
index 0000000..82b07f0
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.h
@@ -0,0 +1,53 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+#import "GAEChannelClient.h"
+#import "APPRTCAppClient.h"
+#import "RTCSessionDescriptonDelegate.h"
+
+// Used to send a message to an apprtc.appspot.com "room".
+@protocol APPRTCSendMessage<NSObject>
+
+- (void)sendData:(NSData *)data;
+
+@end
+
+@class APPRTCViewController;
+
+// The main application class of the AppRTCDemo iOS app demonstrating
+// interoperability between the Objcective C implementation of PeerConnection
+// and the apprtc.appspot.com demo webapp.
+@interface APPRTCAppDelegate : UIResponder<IceServerDelegate,
+ GAEMessageHandler, APPRTCSendMessage, RTCSessionDescriptonDelegate,
+ UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+@property (strong, nonatomic) APPRTCViewController *viewController;
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m b/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m
new file mode 100644
index 0000000..0c429a0
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/APPRTCAppDelegate.m
@@ -0,0 +1,370 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "APPRTCAppDelegate.h"
+
+#import "APPRTCViewController.h"
+#import "RTCIceCandidate.h"
+#import "RTCIceServer.h"
+#import "RTCMediaConstraints.h"
+#import "RTCMediaStream.h"
+#import "RTCPair.h"
+#import "RTCPeerConnection.h"
+#import "RTCPeerConnectionDelegate.h"
+#import "RTCPeerConnectionFactory.h"
+#import "RTCSessionDescription.h"
+
+@interface PCObserver : NSObject<RTCPeerConnectionDelegate>
+
+- (id)initWithDelegate:(id<APPRTCSendMessage>)delegate;
+
+@end
+
+@implementation PCObserver {
+ id<APPRTCSendMessage> _delegate;
+}
+
+- (id)initWithDelegate:(id<APPRTCSendMessage>)delegate {
+ if (self = [super init]) {
+ _delegate = delegate;
+ }
+ return self;
+}
+
+- (void)peerConnectionOnError:(RTCPeerConnection *)peerConnection {
+ NSLog(@"PCO onError.");
+ NSAssert(NO, @"PeerConnection failed.");
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ onSignalingStateChange:(RTCSignalingState)stateChanged {
+ NSLog(@"PCO onSignalingStateChange.");
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ onAddStream:(RTCMediaStream *)stream {
+ NSLog(@"PCO onAddStream.");
+ dispatch_async(dispatch_get_main_queue(), ^(void) {
+ NSAssert([stream.audioTracks count] >= 1,
+ @"Expected at least 1 audio stream");
+ //NSAssert([stream.videoTracks count] >= 1,
+ // @"Expected at least 1 video stream");
+ // TODO(hughv): Add video support
+ });
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ onRemoveStream:(RTCMediaStream *)stream {
+ NSLog(@"PCO onRemoveStream.");
+ // TODO(hughv): Remove video track.
+}
+
+- (void)
+ peerConnectionOnRenegotiationNeeded:(RTCPeerConnection *)peerConnection {
+ NSLog(@"PCO onRenegotiationNeeded.");
+ // TODO(hughv): Handle this.
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ onIceCandidate:(RTCIceCandidate *)candidate {
+ NSLog(@"PCO onIceCandidate.\n Mid[%@] Index[%d] Sdp[%@]",
+ candidate.sdpMid,
+ candidate.sdpMLineIndex,
+ candidate.sdp);
+ NSDictionary *json =
+ @{ @"type" : @"candidate",
+ @"label" : [NSNumber numberWithInt:candidate.sdpMLineIndex],
+ @"id" : candidate.sdpMid,
+ @"candidate" : candidate.sdp };
+ NSError *error;
+ NSData *data =
+ [NSJSONSerialization dataWithJSONObject:json options:0 error:&error];
+ if (!error) {
+ [_delegate sendData:data];
+ } else {
+ NSAssert(NO, @"Unable to serialize JSON object with error: %@",
+ error.localizedDescription);
+ }
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ onIceGatheringChange:(RTCIceGatheringState)newState {
+ NSLog(@"PCO onIceGatheringChange. %d", newState);
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ onIceConnectionChange:(RTCIceConnectionState)newState {
+ NSLog(@"PCO onIceConnectionChange. %d", newState);
+}
+
+@end
+
+@interface APPRTCAppDelegate ()
+
+@property(nonatomic, strong) APPRTCAppClient *client;
+@property(nonatomic, strong) PCObserver *pcObserver;
+@property(nonatomic, strong) RTCPeerConnection *peerConnection;
+@property(nonatomic, strong) RTCPeerConnectionFactory *peerConnectionFactory;
+@property(nonatomic, strong) NSMutableArray *queuedRemoteCandidates;
+
+@end
+
+@implementation APPRTCAppDelegate
+
+#pragma mark - UIApplicationDelegate methods
+
+- (BOOL)application:(UIApplication *)application
+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.viewController =
+ [[APPRTCViewController alloc] initWithNibName:@"RTCViewController"
+ bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ [self displayLogMessage:@"Application lost focus, connection broken."];
+ [self disconnect];
+ [self.viewController resetUI];
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+}
+
+- (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ sourceApplication:(NSString *)sourceApplication
+ annotation:(id)annotation {
+ if (self.client) {
+ return NO;
+ }
+ self.client = [[APPRTCAppClient alloc] init];
+ self.client.iceServerDelegate = self;
+ self.client.messageHandler = self;
+ [self.client connectToRoom:url];
+ return YES;
+}
+
+- (void)displayLogMessage:(NSString *)message {
+ NSLog(@"%@", message);
+ [self.viewController displayText:message];
+}
+
+#pragma mark - RTCSendMessage method
+
+- (void)sendData:(NSData *)data {
+ [self.client sendData:data];
+}
+
+#pragma mark - IceServerDelegate method
+
+- (void)onIceServers:(NSArray *)servers {
+ self.queuedRemoteCandidates = [NSMutableArray array];
+ self.peerConnectionFactory = [[RTCPeerConnectionFactory alloc] init];
+ RTCMediaConstraints *constraints = [[RTCMediaConstraints alloc] init];
+ self.pcObserver = [[PCObserver alloc] initWithDelegate:self];
+ self.peerConnection =
+ [self.peerConnectionFactory peerConnectionWithIceServers:servers
+ constraints:constraints
+ delegate:self.pcObserver];
+ RTCMediaStream *lms =
+ [self.peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"];
+ // TODO(hughv): Add video.
+ [lms addAudioTrack:[self.peerConnectionFactory audioTrackWithId:@"ARDAMSa0"]];
+ [self.peerConnection addStream:lms withConstraints:constraints];
+ [self displayLogMessage:@"onIceServers - add local stream."];
+}
+
+#pragma mark - GAEMessageHandler methods
+
+- (void)onOpen {
+ [self displayLogMessage:@"GAE onOpen - create offer."];
+ RTCPair *audio =
+ [[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"];
+ // TODO(hughv): Add video.
+ // RTCPair *video = [[RTCPair alloc] initWithKey:@"OfferToReceiveVideo"
+ // value:@"true"];
+ NSArray *mandatory = @[ audio /*, video*/ ];
+ RTCMediaConstraints *constraints =
+ [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatory
+ optionalConstraints:nil];
+ [self.peerConnection createOfferWithDelegate:self constraints:constraints];
+ [self displayLogMessage:@"PC - createOffer."];
+}
+
+- (void)onMessage:(NSString *)data {
+ NSString *message = [self unHTMLifyString:data];
+ NSError *error;
+ NSDictionary *objects = [NSJSONSerialization
+ JSONObjectWithData:[message dataUsingEncoding:NSUTF8StringEncoding]
+ options:0
+ error:&error];
+ NSAssert(!error,
+ @"%@",
+ [NSString stringWithFormat:@"Error: %@", error.description]);
+ NSAssert([objects count] > 0, @"Invalid JSON object");
+ NSString *value = [objects objectForKey:@"type"];
+ [self displayLogMessage:
+ [NSString stringWithFormat:@"GAE onMessage type - %@", value]];
+ if ([value compare:@"candidate"] == NSOrderedSame) {
+ NSString *mid = [objects objectForKey:@"id"];
+ NSNumber *sdpLineIndex = [objects objectForKey:@"label"];
+ NSString *sdp = [objects objectForKey:@"candidate"];
+ RTCIceCandidate *candidate =
+ [[RTCIceCandidate alloc] initWithMid:mid
+ index:sdpLineIndex.intValue
+ sdp:sdp];
+ if (self.queuedRemoteCandidates) {
+ [self.queuedRemoteCandidates addObject:candidate];
+ } else {
+ [self.peerConnection addIceCandidate:candidate];
+ }
+ } else if (([value compare:@"offer"] == NSOrderedSame) ||
+ ([value compare:@"answer"] == NSOrderedSame)) {
+ NSString *sdpString = [objects objectForKey:@"sdp"];
+ RTCSessionDescription *sdp =
+ [[RTCSessionDescription alloc] initWithType:value sdp:sdpString];
+ [self.peerConnection setRemoteDescriptionWithDelegate:self
+ sessionDescription:sdp];
+ [self displayLogMessage:@"PC - setRemoteDescription."];
+ } else if ([value compare:@"bye"] == NSOrderedSame) {
+ [self disconnect];
+ } else {
+ NSAssert(NO, @"Invalid message: %@", data);
+ }
+}
+
+- (void)onClose {
+ [self displayLogMessage:@"GAE onClose."];
+ [self disconnect];
+}
+
+- (void)onError:(int)code withDescription:(NSString *)description {
+ [self displayLogMessage:
+ [NSString stringWithFormat:@"GAE onError: %@", description]];
+ [self disconnect];
+}
+
+#pragma mark - RTCSessionDescriptonDelegate methods
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ createSessionDescriptionCompleted:(RTCSessionDescription *)sdp
+ withError:(NSError *)error {
+ if (error) {
+ [self displayLogMessage:@"SDP onFailure."];
+ NSAssert(NO, error.description);
+ return;
+ }
+
+ [self displayLogMessage:@"SDP onSuccess(SDP) - set local description."];
+ [self.peerConnection setLocalDescriptionWithDelegate:self
+ sessionDescription:sdp];
+ [self displayLogMessage:@"PC setLocalDescription."];
+ dispatch_async(dispatch_get_main_queue(), ^(void) {
+ NSDictionary *json = @{ @"type" : sdp.type, @"sdp" : sdp.description };
+ NSError *error;
+ NSData *data =
+ [NSJSONSerialization dataWithJSONObject:json options:0 error:&error];
+ NSAssert(!error,
+ @"%@",
+ [NSString stringWithFormat:@"Error: %@", error.description]);
+ [self sendData:data];
+ });
+}
+
+- (void)peerConnection:(RTCPeerConnection *)peerConnection
+ setSessionDescriptionCompletedWithError:(NSError *)error {
+ if (error) {
+ [self displayLogMessage:@"SDP onFailure."];
+ NSAssert(NO, error.description);
+ return;
+ }
+
+ [self displayLogMessage:@"SDP onSuccess() - possibly drain candidates"];
+ dispatch_async(dispatch_get_main_queue(), ^(void) {
+ // TODO(hughv): Handle non-initiator case. http://s10/46622051
+ if (self.peerConnection.remoteDescription) {
+ [self displayLogMessage:@"SDP onSuccess - drain candidates"];
+ [self drainRemoteCandidates];
+ }
+ });
+}
+
+#pragma mark - internal methods
+
+- (void)disconnect {
+ [self.client
+ sendData:[@"{\"type\": \"bye\"}" dataUsingEncoding:NSUTF8StringEncoding]];
+ self.peerConnection = nil;
+ self.peerConnectionFactory = nil;
+ self.pcObserver = nil;
+ self.client.iceServerDelegate = nil;
+ self.client.messageHandler = nil;
+ self.client = nil;
+}
+
+- (void)drainRemoteCandidates {
+ for (RTCIceCandidate *candidate in self.queuedRemoteCandidates) {
+ [self.peerConnection addIceCandidate:candidate];
+ }
+ self.queuedRemoteCandidates = nil;
+}
+
+- (NSString *)unHTMLifyString:(NSString *)base {
+ // TODO(hughv): Investigate why percent escapes are being added. Removing
+ // them isn't necessary on Android.
+ // convert HTML escaped characters to UTF8.
+ NSString *removePercent =
+ [base stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+ // remove leading and trailing ".
+ NSRange range;
+ range.length = [removePercent length] - 2;
+ range.location = 1;
+ NSString *removeQuotes = [removePercent substringWithRange:range];
+ // convert \" to ".
+ NSString *removeEscapedQuotes =
+ [removeQuotes stringByReplacingOccurrencesOfString:@"\\\""
+ withString:@"\""];
+ // convert \\ to \.
+ NSString *removeBackslash =
+ [removeEscapedQuotes stringByReplacingOccurrencesOfString:@"\\\\"
+ withString:@"\\"];
+ return removeBackslash;
+}
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCViewController.h b/talk/examples/ios/AppRTCDemo/APPRTCViewController.h
new file mode 100644
index 0000000..6b107a5
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/APPRTCViewController.h
@@ -0,0 +1,40 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+// The view controller that is displayed when AppRTCDemo is loaded.
+@interface APPRTCViewController : UIViewController<UITextFieldDelegate>
+
+@property (weak, nonatomic) IBOutlet UITextField *textField;
+@property (weak, nonatomic) IBOutlet UITextView *textInstructions;
+@property (weak, nonatomic) IBOutlet UITextView *textOutput;
+
+- (void)displayText:(NSString *)text;
+- (void)resetUI;
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/APPRTCViewController.m b/talk/examples/ios/AppRTCDemo/APPRTCViewController.m
new file mode 100644
index 0000000..928686b
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/APPRTCViewController.m
@@ -0,0 +1,83 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "APPRTCViewController.h"
+
+@interface APPRTCViewController ()
+
+@end
+
+@implementation APPRTCViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ self.textField.delegate = self;
+}
+
+- (void)displayText:(NSString *)text {
+ dispatch_async(dispatch_get_main_queue(), ^(void) {
+ NSString *output =
+ [NSString stringWithFormat:@"%@\n%@", self.textOutput.text, text];
+ self.textOutput.text = output;
+ });
+}
+
+- (void)resetUI {
+ self.textField.text = nil;
+ self.textField.hidden = NO;
+ self.textInstructions.hidden = NO;
+ self.textOutput.hidden = YES;
+ self.textOutput.text = nil;
+}
+
+#pragma mark - UITextFieldDelegate
+
+- (void)textFieldDidEndEditing:(UITextField *)textField {
+ NSString *room = textField.text;
+ if ([room length] == 0) {
+ return;
+ }
+ textField.hidden = YES;
+ self.textInstructions.hidden = YES;
+ self.textOutput.hidden = NO;
+ // TODO(hughv): Instead of launching a URL with apprtc scheme, change to
+ // prepopulating the textField with a valid URL missing the room. This allows
+ // the user to have the simplicity of just entering the room or the ability to
+ // override to a custom appspot instance. Remove apprtc:// when this is done.
+ NSString *url =
+ [NSString stringWithFormat:@"apprtc://apprtc.appspot.com/?r=%@", room];
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
+}
+
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+ // There is no other control that can take focus, so manually resign focus
+ // when return (Join) is pressed to trigger |textFieldDidEndEditing|.
+ [textField resignFirstResponder];
+ return YES;
+}
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/AppRTCDemo-Info.plist b/talk/examples/ios/AppRTCDemo/AppRTCDemo-Info.plist
new file mode 100644
index 0000000..3ab57ed
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/AppRTCDemo-Info.plist
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIcons</key>
+ <dict>
+ <key>CFBundlePrimaryIcon</key>
+ <dict>
+ <key>CFBundleIconFiles</key>
+ <array>
+ <string>Icon.png</string>
+ </array>
+ </dict>
+ </dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.Google.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>CFBundleURLName</key>
+ <string>com.google.apprtcdemo</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>apprtc</string>
+ </array>
+ </dict>
+ </array>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UIStatusBarTintParameters</key>
+ <dict>
+ <key>UINavigationBar</key>
+ <dict>
+ <key>Style</key>
+ <string>UIBarStyleDefault</string>
+ <key>Translucent</key>
+ <false/>
+ </dict>
+ </dict>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/talk/examples/ios/AppRTCDemo/AppRTCDemo-Prefix.pch b/talk/examples/ios/AppRTCDemo/AppRTCDemo-Prefix.pch
new file mode 100644
index 0000000..3ac2c3b
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/AppRTCDemo-Prefix.pch
@@ -0,0 +1,40 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+//
+// Prefix header for all source files of the 'AppRTCDemo' target in the
+// 'AppRTCDemo' project
+//
+
+#import <Availability.h>
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
+#warning "This project uses features only available in iOS SDK 6.0 and later."
+#endif
+
+#import <UIKit/UIKit.h>
+#import <Foundation/Foundation.h>
diff --git a/talk/examples/ios/AppRTCDemo/Default.png b/talk/examples/ios/AppRTCDemo/Default.png
new file mode 100644
index 0000000..4c8ca6f6
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/Default.png
Binary files differ
diff --git a/talk/examples/ios/AppRTCDemo/GAEChannelClient.h b/talk/examples/ios/AppRTCDemo/GAEChannelClient.h
new file mode 100644
index 0000000..49a928d
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/GAEChannelClient.h
@@ -0,0 +1,49 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+// These methods will be called by the AppEngine chanel. The documentation
+// for these methods is found here. (Yes, it is a JS API.)
+// https://developers.google.com/appengine/docs/java/channel/javascript
+@protocol GAEMessageHandler<NSObject>
+
+- (void)onOpen;
+- (void)onMessage:(NSString *)data;
+- (void)onClose;
+- (void)onError:(int)code withDescription:(NSString *)description;
+
+@end
+
+// Initialize with a token for an AppRTC data channel. This will load
+// ios_channel.html and use the token to establish a data channel between the
+// application and AppEngine.
+@interface GAEChannelClient : NSObject<UIWebViewDelegate>
+
+- (id)initWithToken:(NSString *)token delegate:(id<GAEMessageHandler>)delegate;
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/GAEChannelClient.m b/talk/examples/ios/AppRTCDemo/GAEChannelClient.m
new file mode 100644
index 0000000..9126f67
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/GAEChannelClient.m
@@ -0,0 +1,104 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "GAEChannelClient.h"
+
+#import "RTCPeerConnectionFactory.h"
+
+@interface GAEChannelClient ()
+
+@property(nonatomic, assign) id<GAEMessageHandler> delegate;
+@property(nonatomic, strong) UIWebView *webView;
+
+@end
+
+@implementation GAEChannelClient
+
+- (id)initWithToken:(NSString *)token delegate:(id<GAEMessageHandler>)delegate {
+ self = [super init];
+ if (self) {
+ _webView = [[UIWebView alloc] init];
+ _webView.delegate = self;
+ _delegate = delegate;
+ NSString *htmlPath =
+ [[NSBundle mainBundle] pathForResource:@"ios_channel" ofType:@"html"];
+ NSURL *htmlUrl = [NSURL fileURLWithPath:htmlPath];
+ NSString *path = [NSString stringWithFormat:@"%@?token=%@",
+ [htmlUrl absoluteString],
+ token];
+
+ [_webView
+ loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:path]]];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ _webView.delegate = nil;
+ [_webView stopLoading];
+}
+
+#pragma mark - UIWebViewDelegate method
+
+- (BOOL)webView:(UIWebView *)webView
+ shouldStartLoadWithRequest:(NSURLRequest *)request
+ navigationType:(UIWebViewNavigationType)navigationType {
+ NSString *scheme = [request.URL scheme];
+ if ([scheme compare:@"js-frame"] != NSOrderedSame) {
+ return YES;
+ }
+ NSString *resourceSpecifier = [request.URL resourceSpecifier];
+ NSRange range = [resourceSpecifier rangeOfString:@":"];
+ NSString *method;
+ NSString *message;
+ if (range.length == 0 && range.location == NSNotFound) {
+ method = resourceSpecifier;
+ } else {
+ method = [resourceSpecifier substringToIndex:range.location];
+ message = [resourceSpecifier substringFromIndex:range.location + 1];
+ }
+ dispatch_async(dispatch_get_main_queue(), ^(void) {
+ if ([method compare:@"onopen"] == NSOrderedSame) {
+ [self.delegate onOpen];
+ } else if ([method compare:@"onmessage"] == NSOrderedSame) {
+ [self.delegate onMessage:message];
+ } else if ([method compare:@"onclose"] == NSOrderedSame) {
+ [self.delegate onClose];
+ } else if ([method compare:@"onerror"] == NSOrderedSame) {
+ // TODO(hughv): Get error.
+ int code = -1;
+ NSString *description = message;
+ [self.delegate onError:code withDescription:description];
+ } else {
+ NSAssert(NO, @"Invalid message sent from UIWebView: %@",
+ resourceSpecifier);
+ }
+ });
+ return YES;
+}
+
+@end
diff --git a/talk/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib b/talk/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib
new file mode 100644
index 0000000..cd73ea6
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/en.lproj/APPRTCViewController.xib
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1552</int>
+ <string key="IBDocument.SystemVersion">12D78</string>
+ <string key="IBDocument.InterfaceBuilderVersion">3084</string>
+ <string key="IBDocument.AppKitVersion">1187.37</string>
+ <string key="IBDocument.HIToolboxVersion">626.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">2083</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBNSLayoutConstraint</string>
+ <string>IBProxyObject</string>
+ <string>IBUITextField</string>
+ <string>IBUITextView</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUITextView" id="176994284">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 20}, {280, 141}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSNextKeyView" ref="546385578"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <object class="NSColor" key="IBUIBackgroundColor" id="621995359">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Use Safari and open a URL with a scheme of apprtc to load the test app and connect. i.e. apprtc://apprtc.appspot.com/?r=12345678 Or just enter the room below to connect to apprtc.</string>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="166497611">
+ <int key="type">1</int>
+ <double key="pointSize">14</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="371333696">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUITextField" id="546385578">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 180}, {280, 30}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSNextKeyView" ref="634862110"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="IBUIText"/>
+ <int key="IBUIBorderStyle">3</int>
+ <string key="IBUIPlaceholder">apprtc room</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="14071810">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+ <float key="IBUIMinimumFontSize">17</float>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIKeyboardType">2</int>
+ <int key="IBUIReturnKeyType">3</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="166497611"/>
+ <reference key="IBUIFont" ref="371333696"/>
+ </object>
+ <object class="IBUITextView" id="634862110">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">-2147483356</int>
+ <string key="NSFrame">{{20, 20}, {280, 508}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <reference key="IBUIBackgroundColor" ref="621995359"/>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIEditable">NO</bool>
+ <string key="IBUIText"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="166497611"/>
+ <reference key="IBUIFont" ref="371333696"/>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 548}}</string>
+ <reference key="NSNextKeyView" ref="176994284"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <reference key="NSCustomColorSpace" ref="14071810"/>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
+ <string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
+ <object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <array key="dict.sortedKeys">
+ <integer value="1"/>
+ <integer value="3"/>
+ </array>
+ <array key="dict.values">
+ <string>{320, 568}</string>
+ <string>{568, 320}</string>
+ </array>
+ </object>
+ <string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
+ <string key="IBUIDisplayName">Retina 4 Full Screen</string>
+ <int key="IBUIType">2</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">textField</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="546385578"/>
+ </object>
+ <int key="connectionID">108</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">textInstructions</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="176994284"/>
+ </object>
+ <int key="connectionID">127</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">textOutput</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="634862110"/>
+ </object>
+ <int key="connectionID">138</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <array class="NSMutableArray" key="children">
+ <object class="IBNSLayoutConstraint" id="117610664">
+ <reference key="firstItem" ref="774585933"/>
+ <int key="firstAttribute">6</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="546385578"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="555801739">
+ <reference key="firstItem" ref="546385578"/>
+ <int key="firstAttribute">3</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="774585933"/>
+ <int key="secondAttribute">3</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">180</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="860801955">
+ <reference key="firstItem" ref="546385578"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="774585933"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="19985792">
+ <reference key="firstItem" ref="634862110"/>
+ <int key="firstAttribute">3</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="774585933"/>
+ <int key="secondAttribute">3</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="1001701893">
+ <reference key="firstItem" ref="774585933"/>
+ <int key="firstAttribute">6</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="634862110"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="914503793">
+ <reference key="firstItem" ref="774585933"/>
+ <int key="firstAttribute">4</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="634862110"/>
+ <int key="secondAttribute">4</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="858545289">
+ <reference key="firstItem" ref="634862110"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="774585933"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="1039342825">
+ <reference key="firstItem" ref="774585933"/>
+ <int key="firstAttribute">6</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="176994284"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="663764352">
+ <reference key="firstItem" ref="176994284"/>
+ <int key="firstAttribute">3</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="774585933"/>
+ <int key="secondAttribute">3</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <object class="IBNSLayoutConstraint" id="46028745">
+ <reference key="firstItem" ref="176994284"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="774585933"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">20</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="774585933"/>
+ <int key="scoringType">8</int>
+ <float key="scoringTypeFloat">29</float>
+ <int key="contentType">3</int>
+ </object>
+ <reference ref="176994284"/>
+ <reference ref="546385578"/>
+ <reference ref="634862110"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="176994284"/>
+ <array class="NSMutableArray" key="children">
+ <object class="IBNSLayoutConstraint" id="234302232">
+ <reference key="firstItem" ref="176994284"/>
+ <int key="firstAttribute">8</int>
+ <int key="relation">0</int>
+ <nil key="secondItem"/>
+ <int key="secondAttribute">0</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">141</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="176994284"/>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">1</int>
+ </object>
+ </array>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">62</int>
+ <reference key="object" ref="46028745"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">63</int>
+ <reference key="object" ref="663764352"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">66</int>
+ <reference key="object" ref="1039342825"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">104</int>
+ <reference key="object" ref="546385578"/>
+ <array class="NSMutableArray" key="children"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">107</int>
+ <reference key="object" ref="860801955"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">123</int>
+ <reference key="object" ref="234302232"/>
+ <reference key="parent" ref="176994284"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">124</int>
+ <reference key="object" ref="555801739"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">126</int>
+ <reference key="object" ref="117610664"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">128</int>
+ <reference key="object" ref="634862110"/>
+ <array class="NSMutableArray" key="children"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">133</int>
+ <reference key="object" ref="858545289"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">136</int>
+ <reference key="object" ref="914503793"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">137</int>
+ <reference key="object" ref="1001701893"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">139</int>
+ <reference key="object" ref="19985792"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">APPRTCViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="104.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <boolean value="NO" key="104.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+ <string key="107.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="123.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="124.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="126.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="128.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <boolean value="NO" key="128.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+ <string key="133.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="137.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="139.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <array class="NSMutableArray" key="57.IBViewMetadataConstraints">
+ <reference ref="234302232"/>
+ </array>
+ <boolean value="NO" key="57.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <array key="6.IBViewMetadataConstraints">
+ <reference ref="46028745"/>
+ <reference ref="663764352"/>
+ <reference ref="1039342825"/>
+ <reference ref="858545289"/>
+ <reference ref="914503793"/>
+ <reference ref="1001701893"/>
+ <reference ref="19985792"/>
+ <reference ref="860801955"/>
+ <reference ref="555801739"/>
+ <reference ref="117610664"/>
+ </array>
+ <string key="62.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="63.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="66.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">139</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">NSLayoutConstraint</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/NSLayoutConstraint.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <bool key="IBDocument.UseAutolayout">YES</bool>
+ <string key="IBCocoaTouchPluginVersion">2083</string>
+ </data>
+</archive>
diff --git a/talk/examples/ios/AppRTCDemo/ios_channel.html b/talk/examples/ios/AppRTCDemo/ios_channel.html
new file mode 100644
index 0000000..a55b8f4
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/ios_channel.html
@@ -0,0 +1,88 @@
+<html>
+ <head>
+ <script src="http://apprtc.appspot.com/_ah/channel/jsapi"></script>
+ </head>
+ <!--
+ Helper HTML that redirects Google AppEngine's Channel API to Objective C.
+ This is done by hosting this page in an iOS application. The hosting
+ class creates a UIWebView control and implements the UIWebViewDelegate
+ protocol. Then when there is a channel message, it is encoded in an IFRAME.
+ That IFRAME is added to the DOM which triggers a navigation event
+ |shouldStartLoadWithRequest| in Objective C which can then be routed in the
+ application as desired.
+ -->
+ <body onbeforeunload="closeSocket()" onload="openSocket()">
+ <script type="text/javascript">
+ // QueryString is copy/pasta from
+ // chromium's chrome/test/data/media/html/utils.js.
+ var QueryString = function () {
+ // Allows access to query parameters on the URL; e.g., given a URL like:
+ // http://<url>/my.html?test=123&bob=123
+ // parameters can now be accessed via QueryString.test or
+ // QueryString.bob.
+ var params = {};
+
+ // RegEx to split out values by &.
+ var r = /([^&=]+)=?([^&]*)/g;
+
+ // Lambda function for decoding extracted match values. Replaces '+'
+ // with space so decodeURIComponent functions properly.
+ function d(s) { return decodeURIComponent(s.replace(/\+/g, ' ')); }
+
+ var match;
+ while (match = r.exec(window.location.search.substring(1)))
+ params[d(match[1])] = d(match[2]);
+
+ return params;
+ } ();
+
+ var channel = null;
+ var socket = null;
+
+ function openSocket() {
+ if (!QueryString.token || !QueryString.token.match(/^[A-z0-9_-]+$/)) {
+ // Send error back to ObjC. This will assert in GAEChannelClient.m.
+ sendMessageToObjC("JSError:Missing/malformed token parameter " +
+ QueryString.token);
+ throw "Missing/malformed token parameter: " + QueryString.token;
+ }
+ channel = new goog.appengine.Channel(QueryString.token);
+ socket = channel.open({
+ 'onopen': function() {
+ sendMessageToObjC("onopen");
+ },
+ 'onmessage': function(msg) {
+ sendMessageToObjC("onmessage:" +
+ encodeURIComponent(JSON.stringify(msg.data)));
+ },
+ 'onclose': function() {
+ sendMessageToObjC("onclose");
+ },
+ 'onerror': function(err) {
+ sendMessageToObjC("onerror:" +
+ encodeURIComponent(JSON.stringify(err.code)) +
+ ":message:" +
+ encodeURIComponent(JSON.stringify(err.description)));
+ }
+ });
+ }
+
+ function closeSocket() {
+ socket.close();
+ }
+
+ // Add an IFRAME to the DOM to trigger a navigation event. Then remove
+ // it as it is no longer needed. Only one event is generated.
+ function sendMessageToObjC(message) {
+ var iframe = document.createElement("IFRAME");
+ iframe.setAttribute("src", "js-frame:" + message);
+ // For some reason we need to set a non-empty size for the iOS6
+ // simulator...
+ iframe.setAttribute("height", "1px");
+ iframe.setAttribute("width", "1px");
+ document.documentElement.appendChild(iframe);
+ iframe.parentNode.removeChild(iframe);
+ }
+ </script>
+ </body>
+</html>
diff --git a/talk/examples/ios/AppRTCDemo/main.m b/talk/examples/ios/AppRTCDemo/main.m
new file mode 100644
index 0000000..bf35f4c
--- /dev/null
+++ b/talk/examples/ios/AppRTCDemo/main.m
@@ -0,0 +1,37 @@
+/*
+ * libjingle
+ * Copyright 2013, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+#import "APPRTCAppDelegate.h"
+
+int main(int argc, char *argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(
+ argc, argv, nil, NSStringFromClass([APPRTCAppDelegate class]));
+ }
+}
diff --git a/talk/examples/ios/Icon.png b/talk/examples/ios/Icon.png
new file mode 100644
index 0000000..55773ca
--- /dev/null
+++ b/talk/examples/ios/Icon.png
Binary files differ
diff --git a/talk/examples/ios/README b/talk/examples/ios/README
new file mode 100644
index 0000000..9dbbd3f
--- /dev/null
+++ b/talk/examples/ios/README
@@ -0,0 +1,28 @@
+This directory contains an example iOS client for http://apprtc.appspot.com
+
+Example of building & using the app:
+
+cd <path/to/libjingle>/trunk/talk
+- Open libjingle.xcproj. Select iPhone or iPad simulator and build everything.
+ Then switch to iOS device and build everything. This creates x86 and ARM
+ archives.
+cd examples/ios
+./makeLibs.sh
+- This will generate fat archives containing both targets and copy them to
+ ./libs.
+- This step must be rerun every time you run gclient sync or build the API
+ libraries.
+- Open AppRTCDemo.xcodeproj, select your device or simulator and run.
+- If you have any problems deploying for the first time, check the project
+ properties to ensure that the Bundle Identifier matches your phone
+ provisioning profile. Or use the simulator as it doesn't require a profile.
+
+- In desktop chrome, navigate to http://apprtc.appspot.com and note the r=<NNN>
+ room number in the resulting URL.
+
+- Enter that number into the text field on the phone.
+
+- Alternatively, you can background the app and launch Safari. In Safari, open
+ the url apprtc://apprtc.appspot.com/?r=<NNN> where <NNN> is the room name.
+ Other options are to put the link in an email and send it to your self.
+ Clicking on it will launch AppRTCDemo and navigate to the room.
diff --git a/talk/examples/ios/makeLibs.sh b/talk/examples/ios/makeLibs.sh
new file mode 100755
index 0000000..b5bf3cd
--- /dev/null
+++ b/talk/examples/ios/makeLibs.sh
@@ -0,0 +1,30 @@
+#!/bin/bash -e
+
+if [ "$(dirname $0)" != "." ]; then
+ echo "$(basename $0) must be run from talk/examples/ios as ./$(basename $0)"
+ exit 1
+fi
+
+rm -rf libs
+mkdir libs
+
+cd ../../../xcodebuild/Debug-iphoneos
+for f in *.a; do
+ if [ -f "../Debug-iphonesimulator/$f" ]; then
+ echo "creating fat static library $f"
+ lipo -create "$f" "../Debug-iphonesimulator/$f" -output "../../talk/examples/ios/libs/$f"
+ else
+ echo ""
+ echo "$f was not built for the simulator."
+ echo ""
+ fi
+done
+
+cd ../Debug-iphonesimulator
+for f in *.a; do
+ if [ ! -f "../Debug-iphoneos/$f" ]; then
+ echo ""
+ echo "$f was not built for the iPhone."
+ echo ""
+ fi
+done