Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: build/config/ios/ios_sdk.gni

Issue 2835893004: [ios] Add support for filtering codesiging identity. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/ios/find_signing_identity.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/toolchain/toolchain.gni") 5 import("//build/toolchain/toolchain.gni")
6 6
7 declare_args() { 7 declare_args() {
8 # SDK path to use. When empty this will use the default SDK based on the 8 # SDK path to use. When empty this will use the default SDK based on the
9 # value of use_ios_simulator. 9 # value of use_ios_simulator.
10 ios_sdk_path = "" 10 ios_sdk_path = ""
11 ios_sdk_name = "" 11 ios_sdk_name = ""
12 ios_sdk_version = "" 12 ios_sdk_version = ""
13 ios_sdk_platform = "" 13 ios_sdk_platform = ""
14 ios_sdk_platform_path = "" 14 ios_sdk_platform_path = ""
15 xcode_version = "" 15 xcode_version = ""
16 xcode_build = "" 16 xcode_build = ""
17 machine_os_build = "" 17 machine_os_build = ""
18 18
19 # Version of iOS that we're targeting. 19 # Version of iOS that we're targeting.
20 ios_deployment_target = "9.0" 20 ios_deployment_target = "9.0"
21 21
22 # The iOS Code signing identity to use 22 # The iOS Code signing identity to use
23 # TODO(GYP), TODO(sdfresne): Consider having a separate 23 # TODO(GYP), TODO(sdfresne): Consider having a separate
24 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer. 24 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer.
25 ios_enable_code_signing = true 25 ios_enable_code_signing = true
26 ios_code_signing_identity = "" 26 ios_code_signing_identity = ""
27 ios_code_signing_identity_description = "iPhone Developer"
27 28
28 # Prefix for CFBundleIdentifier property of iOS bundles (correspond to the 29 # Prefix for CFBundleIdentifier property of iOS bundles (correspond to the
29 # "Organization Identifier" in Xcode). Code signing will fail if no mobile 30 # "Organization Identifier" in Xcode). Code signing will fail if no mobile
30 # provisioning for the selected code signing identify support that prefix. 31 # provisioning for the selected code signing identify support that prefix.
31 ios_app_bundle_id_prefix = "org.chromium" 32 ios_app_bundle_id_prefix = "org.chromium"
32 33
33 # If true, then allow using Xcode to automatically manage certificates. This 34 # If true, then allow using Xcode to automatically manage certificates. This
34 # requires loading a separate Xcode project and enable automatically managed 35 # requires loading a separate Xcode project and enable automatically managed
35 # certificates. When true, all test application will use the same bundle id 36 # certificates. When true, all test application will use the same bundle id
36 # to avoid running out of certificates if using a free account. 37 # to avoid running out of certificates if using a free account.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (use_ios_simulator) { 109 if (use_ios_simulator) {
109 # This is weird, but Xcode sets DTPlatformBuild to an empty field for 110 # This is weird, but Xcode sets DTPlatformBuild to an empty field for
110 # simulator builds. 111 # simulator builds.
111 ios_platform_build = "" 112 ios_platform_build = ""
112 } else { 113 } else {
113 ios_platform_build = ios_sdk_build 114 ios_platform_build = ios_sdk_build
114 } 115 }
115 } 116 }
116 117
117 if (ios_enable_code_signing && !use_ios_simulator) { 118 if (ios_enable_code_signing && !use_ios_simulator) {
118 find_signing_identity_args = [] 119 find_signing_identity_args = [
120 "--identity-description",
121 ios_code_signing_identity_description,
122 ]
119 if (!use_system_xcode) { 123 if (!use_system_xcode) {
120 find_signing_identity_args += [ 124 find_signing_identity_args += [
121 "--developer_dir", 125 "--developer_dir",
122 hermetic_xcode_path, 126 hermetic_xcode_path,
123 ] 127 ]
124 } 128 }
125 129
126 # If an identity is not provided, look for one on the host 130 # If an identity is not provided, look for one on the host
127 if (ios_code_signing_identity == "") { 131 if (ios_code_signing_identity == "") {
128 _ios_identities = exec_script("find_signing_identity.py", 132 _ios_identities = exec_script("find_signing_identity.py",
129 find_signing_identity_args, 133 find_signing_identity_args,
130 "list lines") 134 "list lines")
131 ios_code_signing_identity = _ios_identities[0] 135 if (_ios_identities == []) {
132 } 136 print("Tried to prepare a device build without specifying a code signing")
137 print("identity and could not detect one automatically either.")
138 print("TIP: Simulator builds don't require code signing...")
justincohen 2017/04/25 14:31:38 I thought we codesign simulator builds now?
sdefresne 2017/04/25 14:34:53 Simulator builds use "ad-hoc" code signing and do
139 assert(false)
140 } else {
141 _ios_identities_len = 0
142 foreach(_, _ios_identities) {
143 _ios_identities_len += 1
144 }
133 145
134 if (ios_code_signing_identity == "") { 146 ios_code_signing_identity = _ios_identities[0]
135 print("Tried to prepare a device build without specifying a code signing") 147 if (_ios_identities_len != 1) {
136 print("identity and could not detect one automatically either.") 148 print("Warning: Multiple codesigning identities match " +
137 print("TIP: Simulator builds don't require code signing...") 149 "\"$ios_code_signing_identity_description\"")
138 assert(false) 150 foreach(_ios_identity, _ios_identities) {
151 _selected = ""
152 if (ios_code_signing_identity == _ios_identity) {
153 _selected = " (selected)"
154 }
155 print("Warning: - $_ios_identity$_selected")
156 }
157 print("Warning: Please use either ios_code_signing_identity or ")
158 print("Warning: ios_code_signing_identity_description variable to ")
159 print("Warning: control which identity is selected.")
160 print()
161 }
162 }
139 } 163 }
140 } 164 }
OLDNEW
« no previous file with comments | « build/config/ios/find_signing_identity.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698