Skip to content

Commit

Permalink
Merge pull request #540 from nimblehq/feature/454-use-appStore-Connec…
Browse files Browse the repository at this point in the history
…tApiKey

[#454] Use appStoreConnectApiKey() for fastlane match
  • Loading branch information
blyscuit authored Dec 4, 2023
2 parents a268748 + a3d7e1f commit a9b5099
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
API_KEY_ID=""
ISSUER_ID=""
APPSTORE_CONNECT_API_KEY=""
6 changes: 6 additions & 0 deletions fastlane/Constants/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ enum Constant {
static let appleProductionTeamId = "<#teamId#>"
static let keychainName = "{PROJECT_NAME}_keychain"
static let matchURL = "[email protected]:{organization}/{repo}.git"
static let apiKey: [String: Any] = [
"key_id" : Secret.appStoreKeyIdKey,
"issuer_id": Secret.appStoreIssuerIdKey,
"key": Secret.appstoreConnectAPIKey,
"in_house": false
]

// MARK: - Path

Expand Down
1 change: 1 addition & 0 deletions fastlane/Fastfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class Fastfile: LaneFile {
registerDevice(
name: deviceName,
udid: deviceUDID,
apiKey: .userDefined(Constant.apiKey),
teamId: .userDefined(Constant.appleStagingTeamId)
)

Expand Down
1 change: 1 addition & 0 deletions fastlane/Helpers/Match.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ enum Match {
type: type.match,
readonly: .userDefined(!isForce),
appIdentifier: [environment.bundleId],
apiKey: isForce ? .userDefined(Constant.apiKey) : .nil,
username: .userDefined(environment.appleUsername),
teamId: .userDefined(environment.appleTeamId),
gitUrl: Constant.matchURL,
Expand Down

0 comments on commit a9b5099

Please sign in to comment.