blob: cea2aae6af7098593c26ecb05fb0fc327866ca93 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001This directory contains the ObjectiveC implementation of the
2webrtc::PeerConnection API. This can be built for Mac or iOS.
3
4Prerequisites:
5- Make sure gclient is checking out tools necessary to target iOS: your
6 .gclient file should contain a line like:
7 target_os = ['ios', 'mac']
8 Make sure to re-run gclient sync after adding this to download the tools.
9- Set up webrtc-related GYP variables:
10- For Mac:
11 export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 OS=mac
12 target_arch=x64 libjingle_objc=1 libpeer_target_type=static_library
13 $GYP_DEFINES"
14- For iOS:
15 export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 OS=ios
16 libjingle_enable_video=0 libjingle_objc=1 enable_video=0 $GYP_DEFINES"
17- Finally, run "gclient runhooks" to generate iOS or Mac targeting Xcode
18 projects.
19
20Example of building & using the app:
21
22cd <path/to/libjingle>/trunk/talk
23- Open libjingle.xcproj. Select iPhone or iPad simulator and build everything.
24 Then switch to iOS device and build everything. This creates x86 and ARM
25 archives.
26cd examples/ios
27./makeLibs.sh
28- This will generate fat archives containing both targets and copy them to
29 ./libs.
30- This step must be rerun every time you run gclient sync or build the API
31 libraries.
32- Open AppRTCDemo.xcodeproj, select your device or simulator and run.
33- If you have any problems deploying for the first time, check the project
34 properties to ensure that the Bundle Identifier matches your phone
35 provisioning profile. Or use the simulator as it doesn't require a profile.
36
37- In desktop chrome, navigate to http://apprtc.appspot.com and note the r=<NNN>
38 room number in the resulting URL.
39
40- Enter that number into the text field on the phone.
41
42- Alternatively, you can background the app and launch Safari. In Safari, open
43 the url apprtc://apprtc.appspot.com/?r=<NNN> where <NNN> is the room name.
44 Other options are to put the link in an email and send it to your self.
45 Clicking on it will launch AppRTCDemo and navigate to the room.