Skip to content

Commit e209fa7

Browse files
committed
Adding entitlements file specification to code signing in deploy script
1 parent 26f3d34 commit e209fa7

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

deploy_new_version/Sources/deploy/build_xcode_project.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ func codeSignBundle(
4747
projectDirectory: URL,
4848
archiveURL: URL,
4949
identityName: String,
50+
entitlements: String,
5051
appBuildName: String //e.g. Example-app
5152
) throws {
5253
let path = archiveURL.appendingPathComponent("/Products/Applications/\(appBuildName).app").path
5354
try run(name: "codeSignBundle", workingDirectory: projectDirectory, "/usr/bin/codesign", [
5455
"-s", identityName,
56+
"--entitlements", entitlements,
5557
path
5658
])
5759
}

deploy_new_version/Sources/deploy/deploy_new_version.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ func deployNewVersion(
77
projectDirectory: URL,
88
scheme: String,
99
bundleId: String,
10+
entitlements: String,
1011
profileData: Data,
1112
identityData: Data,
1213
identityPassword: String,
@@ -39,7 +40,7 @@ func deployNewVersion(
3940
let archiveURL = tempDir.appendingPathComponent("Archive.xcarchive", isDirectory: false)
4041

4142
try archiveUnsigned(projectDirectory: projectDirectory, archiveURL: archiveURL, scheme: scheme, version: nextVersion)
42-
try codeSignBundle(projectDirectory: projectDirectory, archiveURL: archiveURL, identityName: identityName, appBuildName: "Example-app")
43+
try codeSignBundle(projectDirectory: projectDirectory, archiveURL: archiveURL, identityName: identityName, entitlements: entitlements, appBuildName: "Example-app")
4344

4445
let exportDirectory = tempDir.appendingPathComponent("export", isDirectory: true)
4546
try exportArchive(projectDirectory: projectDirectory, archiveURL: archiveURL, exportDirectory: exportDirectory, exportOptionsPlistURL: exportOptionsPlistURL)

deploy_new_version/Sources/deploy/main.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ do {
66
projectDirectory: URL(fileURLWithPath: env("GITHUB_WORKSPACE")),
77
scheme: "Example-app",
88
bundleId: "com.swedbankpay.exampleapp",
9+
entitlements: "Example-app/Example-app.entitlements",
910
profileData: envBase64("XCODE_PROVISIONING_PROFILE"),
1011
identityData: envBase64("XCODE_SIGNING_CERT"),
1112
identityPassword: env("XCODE_SIGNING_CERT_PASSWORD"),

0 commit comments

Comments
 (0)