Skip to content

Commit

Permalink
[ios] Update documentation to reflect recent changes in gn
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Misha Efimov <[email protected]>
Auto-Submit: Sylvain Defresne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#782952}
  • Loading branch information
sdefresne authored and Commit Bot committed Jun 26, 2020
1 parent 738a906 commit fc11bcd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
12 changes: 4 additions & 8 deletions docs/ios/build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,11 @@ development and testing purposes.
Since the iOS build is a bit more complicated than a desktop build, we provide
`ios/build/tools/setup-gn.py`, which will create four appropriately configured
build directories under `out` for Release and Debug device and simulator
builds, and generates an appropriate Xcode workspace
(`out/build/all.xcworkspace`) as well.
builds, and generates an appropriate Xcode project (`out/build/all.xcodeproj`)
as well.

Warning: *do not open `out/build/products.xcodeproj` as this file does not
configure the "Legacy Build System". If you do open this file, many things
won't work properly (clicking on an error won't open the corresponding file,
...).*

More information about [developing with Xcode](xcode_tips.md).
More information about [developing with Xcode](xcode_tips.md). *Xcode project
is an artifact, any changes made in the project itself will be ignored.*

You can customize the build by editing the file `$HOME/.setup-gn` (create it if
it does not exist). Look at `src/ios/build/tools/setup-gn.config` for
Expand Down
10 changes: 3 additions & 7 deletions docs/ios/xcode_tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ to develop Chrome for iOS.

## Background

### .xcworkspace and .xcodeproj
### .xcodeproj

* Open all.xcworkspace only.
* 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
Expand All @@ -16,10 +16,6 @@ to develop Chrome for iOS.
* 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.

Warning: *do not open the `.xcodeproj` as this file does not configure the
"Legacy Build System". If you do open this file, many things won't work
properly (clicking on an error won't open the corresponding file, ...).*

### Adding new files

* Create new files with `tools/boilerplate.py`
Expand All @@ -35,7 +31,7 @@ properly (clicking on an error won't open the corresponding file, ...).*

## Xcode

* Project location is `src/out/build/`, open `all.workspace`
* 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

Expand Down
4 changes: 2 additions & 2 deletions docs/mac_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ build in the Terminal and write code with a text editor, though.

With hybrid builds, compilation is still handled by Ninja, and can be run from
the command line (e.g. `autoninja -C out/gn chrome`) or by choosing the `chrome`
target in the hybrid workspace and choosing Build.
target in the hybrid project and choosing Build.

To use Xcode-Ninja Hybrid pass `--ide=xcode` to `gn gen`:

Expand All @@ -237,7 +237,7 @@ $ gn gen out/gn --ide=xcode
Open it:

```shell
$ open out/gn/ninja/all.xcworkspace
$ open out/gn/all.xcodeproj
```

You may run into a problem where http://YES is opened as a new tab every time
Expand Down

0 comments on commit fc11bcd

Please sign in to comment.