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
3 # found in the LICENSE file.
6 # SDK path to use. When empty this will use the default SDK based on the
7 # value of use_ios_simulator.
10 use_ios_simulator = target_cpu == "x86" || target_cpu == "x64"
12 # Version of iOS that we're targeting.
13 ios_deployment_target = "7.0"
15 # The iOS Code signing identity to use
16 # TODO(GYP), TODO(sdfresne): Consider having a separate
17 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer.
18 ios_enable_code_signing = true
19 ios_code_signing_identity = ""
22 if (ios_sdk_path == "") {
23 # Compute default target.
24 if (use_ios_simulator) {
25 _ios_sdk_to_query = "iphonesimulator"
27 _ios_sdk_to_query = "iphoneos"
30 exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines")
31 ios_sdk_path = _ios_sdk_result[0]
34 if (use_ios_simulator) {
35 # Always disable code signing on the simulator
36 ios_enable_code_signing = false
37 ios_code_signing_identity = ""
40 if (ios_enable_code_signing) {
41 # If an identity is not provided, look for one on the host
42 if (ios_code_signing_identity == "") {
43 _ios_identities = exec_script("find_signing_identity.py", [], "list lines")
44 ios_code_signing_identity = _ios_identities[0]
47 if (ios_code_signing_identity == "") {
48 print("Tried to prepare a device build without specifying a code signing")
49 print("identity and could not detect one automatically either.")
50 print("TIP: Simulator builds dont require code signing...")