Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: docs/ios_build_instructions.md

Issue 1747873002: docs: convert ios build instructions from html to markdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ### Build Instructions (iOS)
2
3 **Note:** Upstreaming of iOS code is still a work in progress. In particular,
4 note that **it is not currently possible to build an actual Chromium app.**
5 Currently, the buildable binaries are ios\_web\_shell (a minimal wrapper around
6 the web layer), and various unit tests.
7
8 Prerequisites
9 -------------
10
11 - A Mac with a version of OS X capable of running the latest version
12 of Xcode.
13 - The latest version of [Xcode](https://developer.apple.com/xcode/),
14 including the current iOS SDK.
15 - The current version of the JDK (required for the closure compiler).
16 - [depot\_tools](http://dev.chromium.org/developers/how-tos/install-depot-tool s).
17
18 Setting Up
19 ----------
20
21 In the directory where you are going to check out the code, create a
22 `chromium.gyp_env` to set the build to use iOS targets (and to use
23 hybrid builds; see Building below):
24
25 `echo "{ 'GYP_DEFINES': 'OS=ios','GYP_GENERATORS':
26 'ninja,xcode-ninja', }" > chromium.gyp_env`
27
28 If you aren't set up to sign iOS build products via a developer account,
29 you should instead use:
30
31 `echo "{ 'GYP_DEFINES': 'OS=ios chromium_ios_signing=0', 'GYP_GENERATORS': 'ninj a,xcode-ninja', }" > chromium.gyp_env`
32
33 Also, you should [install API
34 keys](https://www.chromium.org/developers/how-tos/api-keys).
35
36 Getting the Code
37 ----------------
38
39 Next, [check out the
40 code](https://www.chromium.org/developers/how-tos/get-the-code), with
41
42 `fetch ios`
43
44 Building
45 --------
46
47 Build the target you are interested in. The instructions above select
48 the ninja/Xcode hybrid mode, which uses ninja to do the actual build,
49 but provides a wrapper Xcode project that can be used to build targets
50 and navigate the source. (The Xcode project just shells out to ninja to
51 do the builds, so you can't actually inspect/change target-level
52 settings from within Xcode; this mode avoids generating a large tree of
53 Xcode projects, which leads to performance issues in Xcode). To build
54 with ninja (simulator and device, respectively):
55
56 `ninja -C out/Debug-iphonesimulator All`
57
58 `ninja -C out/Debug-iphoneos All`
59
60 To build with Xcode, open build/all.ninja.xcworkspace, and choose the
61 target you want to build.
62
63 You should always be able to build all:All, since targets are added
64 there for iOS only when they compile.
65
66 Running
67 -------
68
69 Any target that is built and runs on the bots (see below) should run
70 successfully in a local build. As of the time of writing, this is only
71 ios\_web\_shell and unit test targets—see the note at the top of this
72 page. Check the bots periodically for updates; more targets (new
73 components) will come on line over time.
74
75 To run in the simulator from the command line, you can use `iossim`. For
76 example, to run a debug build of web\_shell:
77
78 `out/Debug-iphonesimulator/iossim out/Debug-iphonesimulator/ios_web_shell.app`
79
80 **Converting an existing Mac checkout into an iOS checkout**
81
82 If you want to convert your Mac checkout into an iOS checkout, you can
83 follow the next steps:
84
85 1- Add 'target\_os = [ "ios" ]' to the bottom of your chromium/.gclient
86 file.
87
88 2- Make sure you have the following in your chromium/chromium.gyp\_env
89 file (removing the `chromium_ios_signing=0` if you want to make
90 developer-signed builds):
91
92 {
sdefresne 2016/03/01 08:47:00 Looking at the processed file at https://chromium.
tfarina 2016/03/01 12:51:56 Done.
93
94 "GYP\_DEFINES" : "OS=ios chromium\_ios\_signing=0",
95
96 "GYP\_GENERATORS" : "ninja,xcode-ninja",
97
98 }
99
100 \
sdefresne 2016/03/01 08:47:00 Remove.
tfarina 2016/03/01 12:51:56 Done.
101
102 Then make sure you sync again to get all the new files like the
103 following. At the end it will run gyp\_chromium which will regenerate
104 all the build files according to the new settings.
105
106 \
sdefresne 2016/03/01 08:47:00 Remove.
tfarina 2016/03/01 12:51:56 Done.
107
108 `gclient sync`
109
110 \
sdefresne 2016/03/01 08:47:00 Remove.
tfarina 2016/03/01 12:51:56 Done.
111
112 Troubleshooting
113 ---------------
114
115 If your build fails, check the iOS columns of [the Mac
116 waterfall](http://build.chromium.org/p/chromium.mac/console) (the last
117 two) to see if the bots are green. In general they should be, since
118 failures on those bots will close the tree.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698