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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/ios/find_signing_identity.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/ios_sdk.gni
diff --git a/build/config/ios/ios_sdk.gni b/build/config/ios/ios_sdk.gni
index ec9d87ffc3f709f520afc5bf4d43c6e8807f4e1c..d576f9c9840105debcf4dc66f1a02ea321cb23ee 100644
--- a/build/config/ios/ios_sdk.gni
+++ b/build/config/ios/ios_sdk.gni
@@ -24,6 +24,7 @@ declare_args() {
# ios_enable_code_signing_flag=<bool> flag to make the invocation clearer.
ios_enable_code_signing = true
ios_code_signing_identity = ""
+ ios_code_signing_identity_description = "iPhone Developer"
# Prefix for CFBundleIdentifier property of iOS bundles (correspond to the
# "Organization Identifier" in Xcode). Code signing will fail if no mobile
@@ -115,7 +116,10 @@ if (ios_sdk_path == "") {
}
if (ios_enable_code_signing && !use_ios_simulator) {
- find_signing_identity_args = []
+ find_signing_identity_args = [
+ "--identity-description",
+ ios_code_signing_identity_description,
+ ]
if (!use_system_xcode) {
find_signing_identity_args += [
"--developer_dir",
@@ -128,13 +132,33 @@ if (ios_enable_code_signing && !use_ios_simulator) {
_ios_identities = exec_script("find_signing_identity.py",
find_signing_identity_args,
"list lines")
- ios_code_signing_identity = _ios_identities[0]
- }
-
- if (ios_code_signing_identity == "") {
- print("Tried to prepare a device build without specifying a code signing")
- print("identity and could not detect one automatically either.")
- print("TIP: Simulator builds don't require code signing...")
- assert(false)
+ if (_ios_identities == []) {
+ print("Tried to prepare a device build without specifying a code signing")
+ print("identity and could not detect one automatically either.")
+ 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
+ assert(false)
+ } else {
+ _ios_identities_len = 0
+ foreach(_, _ios_identities) {
+ _ios_identities_len += 1
+ }
+
+ ios_code_signing_identity = _ios_identities[0]
+ if (_ios_identities_len != 1) {
+ print("Warning: Multiple codesigning identities match " +
+ "\"$ios_code_signing_identity_description\"")
+ foreach(_ios_identity, _ios_identities) {
+ _selected = ""
+ if (ios_code_signing_identity == _ios_identity) {
+ _selected = " (selected)"
+ }
+ print("Warning: - $_ios_identity$_selected")
+ }
+ print("Warning: Please use either ios_code_signing_identity or ")
+ print("Warning: ios_code_signing_identity_description variable to ")
+ print("Warning: control which identity is selected.")
+ print()
+ }
+ }
}
}
« 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