
There is now only a single project generated from gn, so update the documentation to remove reference to the workspace (and remove old warnings against opening the project directly). Bug: none Change-Id: I8d19c078159154c740e9c7fae5b72b62b1997ce3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2267097 Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by: Misha Efimov <mef@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#782952}
60 lines
2.0 KiB
Markdown
60 lines
2.0 KiB
Markdown
# Developing Chrome for iOS with the Xcode IDE
|
|
|
|
This document contains notes used during a presentation about how to use Xcode
|
|
to develop Chrome for iOS.
|
|
|
|
## Background
|
|
|
|
### .xcodeproj
|
|
|
|
* 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
|
|
a `dep` in order for it to be shown in xcode.
|
|
|
|
### Adding new files
|
|
|
|
* 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` or `gclient sync`
|
|
|
|
### Simulators
|
|
|
|
* Simulators build for Mac architecture, not emulators. Fast, generally good
|
|
for most development
|
|
* To run on device, need provisioning profiles and certificate
|
|
|
|
## Xcode
|
|
|
|
* Project location is `src/out/build/`, open `all.xcodeproj`
|
|
* Choose "Automatically generate targets" after a `gclient sync`
|
|
* Start typing while dropdowns are presented to filter the displayed items
|
|
|
|
### Targets
|
|
|
|
* `chrome' is the main application target
|
|
* `ios_web_shell` and `ios_web_view_shell` test lower level of application
|
|
|
|
### Tests
|
|
|
|
* 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.
|