Note: Upstreaming of iOS code is still a work in progress, and is proceeding in conjunction with the layered components refactoring. In particular, note that it is not currently possible to build an actual Chromium app. Currently, the buildable binaries are ios_web_shell (a minimal wrapper around the web layer), and various unit tests.
In the directory where you are going to check out the code, create a
If you aren't set up to sign iOS build products via a developer account, you should instead use:
Also, you should install API keys.
Next, check out the code, with
Build the target you are interested in. The instructions above select the ninja/Xcode hybrid mode, which uses ninja to do the actual build, but provides a wrapper Xcode project that can be used to build targets and navigate the source. (The Xcode project just shells out to ninja to do the builds, so you can't actually inspect/change target-level settings from within Xcode; this mode avoids generating a large tree of Xcode projects, which leads to performance issues in Xcode). To build with ninja (simulator and device, respectively):
To build with Xcode, open build/all.ninja.xcworkspace, and choose the target you want to build.
You should always be able to build all:All, since targets are added there for iOS only when they compile.
Any target that is built and runs on the bots (see below) should run successfully in a local build. As of the time of writing, this is only ios_web_shell and unit test targets—see the note at the top of this page. Check the bots periodically for updates; more targets (new components) will come on line over time.
To run in the simulator from the command line, you can use
Converting an existing Mac checkout into an iOS checkout
If you want to convert your Mac checkout into an iOS checkout, you can follow the next steps:
1- Add 'target_os = [ "ios" ]' to the bottom of your chromium/.gclient file.
2- Make sure you have the following in your chromium/chromium.gyp_env file (removing the
"GYP_DEFINES" : "OS=ios chromium_ios_signing=0",
"GYP_GENERATORS" : "ninja,xcode-ninja",
Then make sure you sync again to get all the new files like the following. At the end it will run gyp_chromium which will regenerate all the build files according to the new settings.
If your build fails, check the iOS columns of the Mac waterfall (the last two) to see if the bots are green. In general they should be, since failures on those bots will close the tree.