OLD | NEW |
| (Empty) |
1 We want to generate a dynamic framework for a CocoaPod. Unfortunately, using gyp
-xcode generation | |
2 for a framework currently presents some issues. To get around those issues, we c
hose to create a | |
3 project with Xcode for building the framework directly. | |
4 | |
5 The Framework directory contains the Xcode project used to build the framework.
The PodTest | |
6 directory contains a project used to confirm that the built framework installs c
orrectly with | |
7 CocoaPods. The build_ios_framework.sh script needs to be run first, then `pod in
stall` should be run | |
8 in the same directory as the Xcode project. After installing, the PodTest.xcwork
space should be used | |
9 instead of PodTest.xcodeproj. | |
10 | |
11 USAGE | |
12 To build the framework, run the build_ios_framework.sh script. This will build s
tatic libraries for | |
13 iOS (via the build_ios_libs.sh script), collect header files and adjust import/i
nclude statements | |
14 for use inside the framework, build the framework using the Xcode project, merge
multiple | |
15 architectures together, and collect the framework files (the .framework itself a
nd the .dSYM) with | |
16 the Podspec into a common directory. | |
17 | |
18 DETAILS OF THE XCODE PROJECT | |
19 The Xcode project contains relative references to the built static libraries (fr
om | |
20 build_ios_libs.sh), with the exception of librtc_api_objc and librtc_base_objc.
The iOS source files | |
21 from webrtc/api/objc and webrtc/base/objc are also included. NOTE: This will req
uire updating | |
22 if/when the built static libraries change. | |
23 | |
24 The flattened header files for webrtc/api/objc and webrtc/base/objc were also ad
ded to the Public | |
25 Headers of the framework target. NOTE: This will require updating as the Obj-C A
PI changes. | |
26 | |
27 Preprocessor definitions were copied from a gyp-xcode generated project. | |
28 | |
29 RTTI was disabled due to compiler errors and based on the setting in build/commo
n.gypi | |
30 (https://code.google.com/p/chromium/codesearch#chromium/src/build/common.gypi&q=
rtti&sq=package:chromium&type=cs&l=5069). | |
31 | |
32 Bitcode is disabled for the time being. | |
33 | |
34 The minimum number of system frameworks were linked against based on build error
s (currently | |
35 AVFoundation, AudioToolbox, CoreMedia, VideoToolbox). | |
36 | |
37 The Build Products Path (SYMROOT) was changed to $SRCROOT/build so the build pro
ducts are in a known | |
38 location. | |
39 | |
40 The created WebRTC scheme was shared so the build_ios_framework.sh script will w
ork on any machine | |
41 that runs it. | |
42 | |
43 DEPLOYMENT_POSTPROCESSING is set to "Yes" so debug symbols will be stripped (the
iOS Default for | |
44 STRIP_INSTALLED_PRODUCT is already set to "Yes"). | |
45 | |
46 "-ObjC" is added to OTHER_LDFLAGS to ensure category methods (in particular, tho
se from | |
47 RTCAudioSession+Configuration.mm) are included in the framework binary. | |
48 | |
49 During the build process, dSYMs will be generated for each architecture alongsid
e each framework | |
50 bundle. These are merged together and placed alongside the final framework produ
ct. | |
OLD | NEW |