OLD | NEW |
| (Empty) |
1 This directory contains the ObjectiveC implementation of the | |
2 webrtc::PeerConnection API. This can be built for Mac or iOS. This | |
3 file describes building the API, unit test, and AppRTCDemo sample app. | |
4 | |
5 Prerequisites: | |
6 - Make sure gclient is checking out tools necessary to target iOS: your | |
7 .gclient file should contain a line like: | |
8 target_os = ['ios', 'mac'] | |
9 Make sure to re-run gclient sync after adding this to download the tools. | |
10 | |
11 - Set up webrtc-related $GYP_DEFINES; example shell functions that set | |
12 up for building for iOS-device, iOS-simulator, and Mac (resp) are: | |
13 function wrbase() { | |
14 cd /path/to/webrtc/src | |
15 } | |
16 | |
17 function wrios() { | |
18 wrbase | |
19 export GYP_DEFINES="$GYP_DEFINES OS=ios" | |
20 export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios" | |
21 export GYP_CROSSCOMPILE=1 | |
22 } | |
23 | |
24 function wrios32() { | |
25 wrios | |
26 export GYP_DEFINES="$GYP_DEFINES target_arch=arm" | |
27 } | |
28 | |
29 function wrios64() { | |
30 wrios | |
31 export GYP_DEFINES="$GYP_DEFINES target_arch=arm64" | |
32 } | |
33 | |
34 function wrsim() { | |
35 wrbase | |
36 export GYP_DEFINES="$GYP_DEFINES OS=ios target_subarch=arm32 target_arch=ia32" | |
37 export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_sim" | |
38 export GYP_CROSSCOMPILE=1 | |
39 } | |
40 | |
41 function wrmac() { | |
42 wrbase | |
43 export GYP_DEFINES="$GYP_DEFINES OS=mac target_subarch=arm64 target_arch=x64" | |
44 export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_mac" | |
45 } | |
46 | |
47 - Finally, run "webrtc/build/gyp_webrtc.py" to generate ninja files. | |
48 | |
49 Example of building & using the unittest & app: | |
50 | |
51 - To build & run the unittest (must target mac): | |
52 wrmac && ./webrtc/build/gyp_webrtc.py && \ | |
53 ninja -C out_mac/Debug libjingle_peerconnection_objc_test && \ | |
54 ./out_mac/Debug/libjingle_peerconnection_objc_test.app/Contents/MacOS/libj
ingle_peerconnection_objc_test | |
55 | |
56 - To build & launch the sample app on OSX: | |
57 wrmac && ./webrtc/build/gyp_webrtc.py && ninja -C out_mac/Debug AppRTCDemo &&
\ | |
58 ./out_mac/Debug/AppRTCDemo.app/Contents/MacOS/AppRTCDemo | |
59 | |
60 - To build & launch the sample app on the iOS simulator: | |
61 wrsim && ./webrtc/build/gyp_webrtc.py && ninja -C out_sim/Debug iossim AppRTCD
emo && \ | |
62 ./out_sim/Debug/iossim out_sim/Debug/AppRTCDemo.app | |
63 | |
64 - To build & sign the sample app for an iOS device (32 bit): | |
65 wrios32 && ./webrtc/build/gyp_webrtc.py && ninja -C out_ios/Debug-iphoneos App
RTCDemo | |
66 | |
67 - To build & sign the sample app for an iOS device (64 bit): | |
68 wrios64 && ./webrtc/build/gyp_webrtc.py && ninja -C out_ios/Debug-iphoneos App
RTCDemo | |
OLD | NEW |