Fix code signing for iOS bundle when targetting simulator.
When building for simulator, embedded.mobileprovision should not be copied into the bundle, and not entitlement should be passed to the "codesign" tool. BUG=634373 Review-Url: https://codereview.chromium.org/2231723002 Cr-Original-Commit-Position: refs/heads/master@{#411006} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: aa4d65708c18e2b407f92654237ab2c1fdc3cea7
This commit is contained in:
Родитель
c8f6386d71
Коммит
99af9357d5
|
@ -268,6 +268,9 @@ class CodeSignBundleAction(Action):
|
|||
parser.add_argument(
|
||||
'--disable-code-signature', action='store_false', dest='sign',
|
||||
help='disable code signature')
|
||||
parser.add_argument(
|
||||
'--platform', '-t', required=True,
|
||||
help='platform the signed bundle is targetting')
|
||||
parser.set_defaults(sign=True)
|
||||
|
||||
@staticmethod
|
||||
|
@ -283,7 +286,7 @@ class CodeSignBundleAction(Action):
|
|||
provisioning_profile_required = args.identity != '-'
|
||||
provisioning_profile = FindProvisioningProfile(
|
||||
bundle.identifier, provisioning_profile_required)
|
||||
if provisioning_profile:
|
||||
if provisioning_profile and args.platform != 'iphonesimulator':
|
||||
provisioning_profile.Install(bundle)
|
||||
|
||||
# Delete existing code signature.
|
||||
|
@ -306,7 +309,7 @@ class CodeSignBundleAction(Action):
|
|||
# Embeds entitlements into the code signature (if code signing identify has
|
||||
# been provided).
|
||||
codesign_extra_args = []
|
||||
if provisioning_profile:
|
||||
if provisioning_profile and args.platform != 'iphonesimulator':
|
||||
temporary_entitlements_file = tempfile.NamedTemporaryFile(suffix='.xcent')
|
||||
codesign_extra_args.extend(
|
||||
['--entitlements', temporary_entitlements_file.name])
|
||||
|
|
|
@ -480,6 +480,7 @@ template("ios_app_bundle") {
|
|||
}
|
||||
code_signing_args = [
|
||||
"code-sign-bundle",
|
||||
"-t=" + ios_sdk_name,
|
||||
"-i=" + ios_code_signing_identity,
|
||||
"-e=" + rebase_path(_entitlements_path, root_build_dir),
|
||||
"-b=" + rebase_path("$target_out_dir/$_output_name", root_build_dir),
|
||||
|
@ -1174,6 +1175,7 @@ template("ios_framework_bundle") {
|
|||
}
|
||||
code_signing_args = [
|
||||
"code-sign-bundle",
|
||||
"-t=" + ios_sdk_name,
|
||||
"-i=" + ios_code_signing_identity,
|
||||
"-e=" + rebase_path(_entitlements_path, root_build_dir),
|
||||
"-b=" +
|
||||
|
@ -1415,6 +1417,7 @@ template("ios_xctest_test") {
|
|||
}
|
||||
code_signing_args = [
|
||||
"code-sign-bundle",
|
||||
"-t=" + ios_sdk_name,
|
||||
"-i=" + ios_code_signing_identity,
|
||||
"-e=" + rebase_path(_entitlements_path, root_build_dir),
|
||||
"-b=" + rebase_path("$target_out_dir/$_xctest_output", root_build_dir),
|
||||
|
|
Загрузка…
Ссылка в новой задаче