This document contains notes used during a presentation about how to use Xcode to develop Chrome for iOS.
- Open all.xcodeproj only.
- Generated from BUILD.gn files.
- Don't make changes to it as it is a "fake" representation of the project
- changes will not be committed
- changes will be overwritten without warning
- Modify BUILD files instead
- Added BUILD.gn files/
source_sets
need to be referenced from other ones as adep
in order for it to be shown in xcode.
- Create new files with
tools/boilerplate.py
- Add files to BUILD.gn
mate ios/chrome/...BUILD.gn
- Add new source_set target as a dep of another target
- Execute
gclient runhooks
orgclient sync
- Simulators build for Mac architecture, not emulators. Fast, generally good for most development
- To run on device, need provisioning profiles and certificate
- Project location is
src/out/build/
, openall.xcodeproj
- Choose "Automatically generate targets" after a
gclient sync
- Start typing while dropdowns are presented to filter the displayed items
- `chrome' is the main application target
ios_web_shell
andios_web_view_shell
test lower level of application
-
Unittests/Inttests
- Add flags to specify tests to run (Option-Click on unittest target name, select Run from left panel, add to "Arguments Passed on Launch")
gtest_filter=TestClass.*
gtest_repeat=20
- Full list of options available by sending an unknown option
-
EarlGrey
- EG1 deprecated
- EG2 are current UI tests
- A separate "test" process communicates with "the app".
- EDO is term for "distant object" on "the other side".
- egtest files can run under both EG1 and EG2 with correct setup in BUILD.gn because the layer of helpers encapsulate the necessary differences.