chrome_build.gni 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Copyright 2016 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/apple/symbols.gni")
  5. import("//build/config/chrome_build.gni")
  6. import("//build/config/ios/ios_sdk.gni")
  7. # Xcode 13.1 or higher is required to build Chromium on iOS. This file should
  8. # only be included when building Chromium, not other related projects (cronet,
  9. # webrtc, ...).
  10. assert(xcode_version_int >= 1310, "Xcode 13.1 or higher is required.")
  11. declare_args() {
  12. # Enable widget extensions.
  13. ios_enable_content_widget_extension = true
  14. ios_enable_search_widget_extension = true
  15. # Enable iOS 14, WidgetKit extension.
  16. ios_enable_widget_kit_extension = true
  17. # Enable iOS 16 lockscreen extensions.
  18. ios_enable_lockscreen_extension = true
  19. # Enable share extension.
  20. ios_enable_share_extension = true
  21. # Enable credential provider extension.
  22. ios_enable_credential_provider_extension = true
  23. # Enable intents extension.
  24. ios_enable_intents_extension = false
  25. # Label of the target providing implementation for AccountVerificationProvider.
  26. # Overridden when using the Google-internal repository to build Chrome on iOS.
  27. ios_account_verification_provider_target = "//ios/chrome/credential_provider_extension:account_verification_provider_implementation"
  28. # The API key to query Google services in the Credential Provider Extension.
  29. ios_credential_provider_extension_api_key = ""
  30. # Controls whether ScreenTime API is used.
  31. ios_enable_screen_time = true
  32. # Enable background fetch mode for feed refresh.
  33. ios_enable_background_mode = true
  34. # Value of the encryption export compliance code. See "Cryptography and
  35. # U.S. Export Compliance" in "Submitting the App to App Review" in the
  36. # Apple developer documentation (https://goo.gl/yv1xEF).
  37. ios_encryption_export_compliance_code = ""
  38. # List of plist templates to merge when generating chrome Info.plist.
  39. ios_chrome_info_plist_additions = []
  40. # List of targets used to generate the plist listed in
  41. # ios_chrome_info_plist_additions variable (if any).
  42. ios_chrome_info_plist_addition_targets = []
  43. # List of plist templates to merge when generating chrome entitlements.
  44. ios_chrome_entitlements_additions = []
  45. # List of plist templates to merge when generating EarlGrey tests
  46. # entitlements.
  47. ios_egtests_entitlements_additions = []
  48. # Overridable list of dependencies that are forbidden for
  49. # //ios/chrome/app:chrome target.
  50. ios_chrome_extra_assert_no_deps = []
  51. # List of plist templates to merge when generating chrome cpe entitlements.
  52. ios_chrome_cpe_entitlements_additions = []
  53. }
  54. if (target_environment == "catalyst") {
  55. # Some extensions uses API that are not available in "catalyst" environment.
  56. ios_enable_content_widget_extension = false
  57. ios_enable_search_widget_extension = false
  58. ios_enable_credential_provider_extension = false
  59. ios_enable_widget_kit_extension = false
  60. ios_enable_prebuilt_widget_kit_extension = false
  61. # ScreenTime framework is not available in the iOS support libraries provided
  62. # by "catalyst" environment.
  63. ios_enable_screen_time = false
  64. }
  65. # Configure whether breakpad support is enabled.
  66. breakpad_enabled = is_official_build && is_chrome_branded
  67. if (breakpad_enabled) {
  68. breakpad_enabled_as_int = 1
  69. is_official_release = enable_dsyms && target_environment == "device" &&
  70. current_toolchain == default_toolchain
  71. } else {
  72. breakpad_enabled_as_int = 0
  73. is_official_release = false
  74. }
  75. chromium_bundle_id = "$ios_app_bundle_id_prefix.chrome.ios.dev"
  76. chromium_handoff_id = "$ios_app_bundle_id_prefix.chrome.handoff"
  77. ios_move_tab_activity_type = "$ios_app_bundle_id_prefix.chrome.move-tab"
  78. if (is_chrome_branded) {
  79. chromium_short_name = "Chrome"
  80. url_channel_scheme = "googlechrome-dev"
  81. url_secure_scheme = "googlechromes"
  82. url_ssoauth_scheme = "$ios_app_bundle_id_prefix.sso.chrome.stable"
  83. url_unsecure_scheme = "googlechrome"
  84. url_x_callback_scheme = "googlechrome-x-callback"
  85. } else {
  86. chromium_short_name = "Chromium"
  87. url_channel_scheme = "chromium-dev"
  88. url_secure_scheme = "chromiums"
  89. url_ssoauth_scheme = "$ios_app_bundle_id_prefix.sso.chromium"
  90. url_unsecure_scheme = "chromium"
  91. url_x_callback_scheme = "chromium-x-callback"
  92. }