Commit 7080fe3b authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Assert that the version of Xcode is high enough

The new Widget requires Xcode 12.0 or higher to build, so assert
that the version of Xcode used for the build is recent enough.

Update the documentation to recommend the same version of Xcode
as enforced by the code, and add tips on steps recommended to
perform when updating Xcode.

Bug: none
Change-Id: I8b8fbf3d53ef2ab98c2407e28e46ce4321cd72f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527175
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarGuillaume Jenkins <gujen@google.com>
Cr-Commit-Position: refs/heads/master@{#827785}
parent 86b4807e
......@@ -13,7 +13,7 @@ Are you a Google employee? See
## System requirements
* A 64-bit Mac running 10.12.6 or later.
* [Xcode](https://developer.apple.com/xcode) 11.4+.
* [Xcode](https://developer.apple.com/xcode) 12.0 or higher.
* The current version of the JDK (required for the Closure compiler).
## Install `depot_tools`
......@@ -328,6 +328,42 @@ ask there. As mentioned above, be sure that the
[waterfall](https://build.chromium.org/buildbot/waterfall/) is green and the tree
is open before checking out. This will increase your chances of success.
### Changing the version of Xcode
To change the version of Xcode used to build Chromium on iOS, please follow
the steps below:
1. Launch the new version of Xcode.app.
This is required as Xcode may need to install some components into
the system before the new version can be used from the command-line.
1. Reboot your computer.
This is required as some of Xcode components are daemons that are not
automatically stopped when updating Xcode, and command-line tools will
fail if the daemon version is incompatible (usually `actool` fails).
1. Run `gn gen`.
This is required as the `ninja` files generated by `gn` encodes some
information about Xcode (notably the path to the SDK, ...) that will
change with each version. It is not possible to have `ninja` re-run
`gn gen` automatically when those changes unfortunately.
If you have a downstream chekout, run `gclient runhooks` instead of
`gn gen` as it will ensure that `gn gen` will be run automatically
for all possible combination of target and configuration from within
Xcode.
If you skip some of those steps, the build may occasionally succeed, but
it has been observed in the past that those steps are required in the
vast majority of the situation. Please save yourself some painful build
debugging and follow them.
If you use `xcode-select` to switch between multiple version of Xcode,
you will have to follow the same steps.
### Improving performance of `git status`
#### Increase the vnode cache size
......
......@@ -6,6 +6,11 @@ import("//build/config/chrome_build.gni")
import("//build/config/ios/ios_sdk.gni")
import("//build/config/mac/symbols.gni")
# Xcode 12.0 or higher is required to build Chromium on iOS. This file should
# only be included when building Chromium, not other related projects (cronet,
# webrtc, ...).
assert(xcode_version_int >= 1200, "Xcode 12.0 or higher is required.")
declare_args() {
# Enable widget extensions.
ios_enable_content_widget_extension = true
......@@ -32,6 +37,9 @@ declare_args() {
# setting |ios_enable_scene_startup| to |true|.
ios_enable_multi_window = true
# Controls whether ScreenTime API is used.
ios_enable_screen_time = true
# When set the main plist CFBundleVersion will be set to ios_lock_to_version,
# followed by the milestone and patch in one tuple, e.g. 86.0.4240.8720 where
# 87 is the milestone and 20 is the stable patch. Note that CFBundleVersion
......@@ -67,18 +75,17 @@ declare_args() {
ios_chrome_cpe_entitlements_additions = []
}
# ScreenTime is only available in iOS 14.0+ SDK. It is not available either
# in the iOS support libraries used by "catalyst" environment.
ios_enable_screen_time =
xcode_version_int >= 1200 && target_environment != "catalyst"
# Some extensions uses API that are not available in "catalyst" environment.
if (target_environment == "catalyst") {
# Some extensions uses API that are not available in "catalyst" environment.
ios_enable_content_widget_extension = false
ios_enable_search_widget_extension = false
ios_enable_credential_provider_extension = false
ios_enable_widget_kit_extension = false
ios_enable_prebuilt_widget_kit_extension = false
# ScreenTime framework is not available in the iOS support libraries provided
# by "catalyst" environment.
ios_enable_screen_time = false
}
# Configure whether breakpad support is enabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment