blob: 52a82e353077b0655c6a4ceed84d91a50ddbd58c [file] [log] [blame] [view]
Mike Doughertyd8947a592020-05-07 19:43:461# Developing Chrome for iOS with the Xcode IDE
2
3This document contains notes used during a presentation about how to use Xcode
4to develop Chrome for iOS.
5
6## Background
7
Sylvain Defresnefc11bcd2020-06-26 13:42:008### .xcodeproj
Mike Doughertyd8947a592020-05-07 19:43:469
Sylvain Defresnefc11bcd2020-06-26 13:42:0010* Open all.xcodeproj only.
Mike Doughertyd8947a592020-05-07 19:43:4611* Generated from BUILD.gn files.
12* Don't make changes to it as it is a "fake" representation of the project
13 - changes will not be committed
14 - changes will be overwritten without warning
15* Modify BUILD files instead
16* Added BUILD.gn files/`source_sets` need to be referenced from other ones as
17 a `dep` in order for it to be shown in xcode.
18
Mike Doughertyd8947a592020-05-07 19:43:4619### Adding new files
20
21* Create new files with `tools/boilerplate.py`
22* Add files to BUILD.gn `mate ios/chrome/...BUILD.gn`
23* Add new source_set target as a dep of another target
24* Execute `gclient runhooks` or `gclient sync`
25
26### Simulators
27
28* Simulators build for Mac architecture, not emulators. Fast, generally good
29 for most development
30* To run on device, need provisioning profiles and certificate
31
32## Xcode
33
Sylvain Defresnefc11bcd2020-06-26 13:42:0034* Project location is `src/out/build/`, open `all.xcodeproj`
Mike Doughertyd8947a592020-05-07 19:43:4635* Choose "Automatically generate targets" after a `gclient sync`
36* Start typing while dropdowns are presented to filter the displayed items
37
38### Targets
39
40* `chrome' is the main application target
41* `ios_web_shell` and `ios_web_view_shell` test lower level of application
42
43### Tests
44
45* Unittests/Inttests
46 - Add flags to specify tests to run (Option-Click on unittest target name,
47 select Run from left panel, add to "Arguments Passed on Launch")
48 - `gtest_filter=TestClass.*`
49 - `gtest_repeat=20`
50 - Full list of options available by sending an unknown option
51
52* EarlGrey
53 - EG1 deprecated
54 - EG2 are current UI tests
55 - A separate "test" process communicates with "the app".
56 - EDO is term for "distant object" on "the other side".
57 - egtest files can run under both EG1 and EG2 with correct setup in
58 BUILD.gn because the layer of helpers encapsulate the necessary
59 differences.