Skip to content

Commit c31a1ef

Browse files
committed
Merge branch 'main' into matt/cryptexRuntimeDownloads
2 parents 20b9833 + c245a1e commit c31a1ef

7 files changed

Lines changed: 146 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: macos-13
11+
runs-on: macos-14
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Run tests
1515
env:
16-
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app
16+
DEVELOPER_DIR: /Applications/Xcode_16.app
1717
run: xcodebuild test -scheme Xcodes

Xcodes/Backend/AppState.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ class AppState: ObservableObject {
436436
guard let availableXcode = availableXcodes.first(where: { $0.version == id }) else { return }
437437

438438
installationPublishers[id] = signInIfNeeded()
439+
.handleEvents(
440+
receiveSubscription: { [unowned self] _ in
441+
self.setInstallationStep(of: availableXcode.version, to: .authenticating)
442+
}
443+
)
439444
.flatMap { [unowned self] in
440445
// signInIfNeeded might finish before the user actually authenticates if UI is involved.
441446
// This publisher will wait for the @Published authentication state to change to authenticated or unauthenticated before finishing,

Xcodes/Backend/XcodeCommands.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ struct XcodeCommands: Commands {
3535

3636
struct InstallButton: View {
3737
@EnvironmentObject var appState: AppState
38-
@State private var isLoading = false
3938

4039
let xcode: Xcode?
4140

4241
var body: some View {
43-
ProgressButton(isInProgress: isLoading) {
42+
Button {
4443
install()
4544
} label: {
4645
Text("Install")
@@ -49,7 +48,6 @@ struct InstallButton: View {
4948
}
5049

5150
private func install() {
52-
isLoading = true
5351
guard let xcode = xcode else { return }
5452
appState.checkMinVersionAndInstall(id: xcode.id)
5553
}

Xcodes/Frontend/InfoPane/InstallationStepDetailView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct InstallationStepDetailView: View {
1717
showsAdditionalDescription: true
1818
)
1919

20-
case .unarchiving, .moving, .trashingArchive, .checkingSecurity, .finishing:
20+
case .authenticating, .unarchiving, .moving, .trashingArchive, .checkingSecurity, .finishing:
2121
ProgressView()
2222
.scaleEffect(0.5)
2323
}

Xcodes/Frontend/XcodeList/InstallationStepRowView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct InstallationStepRowView: View {
1818
controlSize: .small,
1919
style: .spinning
2020
)
21-
case .unarchiving, .moving, .trashingArchive, .checkingSecurity, .finishing:
21+
case .authenticating, .unarchiving, .moving, .trashingArchive, .checkingSecurity, .finishing:
2222
ProgressView()
2323
.scaleEffect(0.5)
2424
}

Xcodes/Resources/Localizable.xcstrings

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4446,6 +4446,131 @@
44464446
}
44474447
}
44484448
},
4449+
"Authenticating" : {
4450+
"extractionState" : "manual",
4451+
"localizations" : {
4452+
"ar" : {
4453+
"stringUnit" : {
4454+
"state" : "translated",
4455+
"value" : "Authenticating"
4456+
}
4457+
},
4458+
"ca" : {
4459+
"stringUnit" : {
4460+
"state" : "translated",
4461+
"value" : "Authenticating"
4462+
}
4463+
},
4464+
"de" : {
4465+
"stringUnit" : {
4466+
"state" : "translated",
4467+
"value" : "Authenticating"
4468+
}
4469+
},
4470+
"el" : {
4471+
"stringUnit" : {
4472+
"state" : "translated",
4473+
"value" : "Authenticating"
4474+
}
4475+
},
4476+
"en" : {
4477+
"stringUnit" : {
4478+
"state" : "translated",
4479+
"value" : "Authenticating"
4480+
}
4481+
},
4482+
"es" : {
4483+
"stringUnit" : {
4484+
"state" : "translated",
4485+
"value" : "Authenticating"
4486+
}
4487+
},
4488+
"fi" : {
4489+
"stringUnit" : {
4490+
"state" : "translated",
4491+
"value" : "Authenticating"
4492+
}
4493+
},
4494+
"fr" : {
4495+
"stringUnit" : {
4496+
"state" : "translated",
4497+
"value" : "Authenticating"
4498+
}
4499+
},
4500+
"hi" : {
4501+
"stringUnit" : {
4502+
"state" : "translated",
4503+
"value" : "Authenticating"
4504+
}
4505+
},
4506+
"it" : {
4507+
"stringUnit" : {
4508+
"state" : "translated",
4509+
"value" : "Authenticating"
4510+
}
4511+
},
4512+
"ja" : {
4513+
"stringUnit" : {
4514+
"state" : "translated",
4515+
"value" : "認証中"
4516+
}
4517+
},
4518+
"ko" : {
4519+
"stringUnit" : {
4520+
"state" : "translated",
4521+
"value" : "Authenticating"
4522+
}
4523+
},
4524+
"nl" : {
4525+
"stringUnit" : {
4526+
"state" : "translated",
4527+
"value" : "Authenticating"
4528+
}
4529+
},
4530+
"pl" : {
4531+
"stringUnit" : {
4532+
"state" : "translated",
4533+
"value" : "Authenticating"
4534+
}
4535+
},
4536+
"pt-BR" : {
4537+
"stringUnit" : {
4538+
"state" : "translated",
4539+
"value" : "Authenticating"
4540+
}
4541+
},
4542+
"ru" : {
4543+
"stringUnit" : {
4544+
"state" : "translated",
4545+
"value" : "Authenticating"
4546+
}
4547+
},
4548+
"tr" : {
4549+
"stringUnit" : {
4550+
"state" : "translated",
4551+
"value" : "Authenticating"
4552+
}
4553+
},
4554+
"uk" : {
4555+
"stringUnit" : {
4556+
"state" : "translated",
4557+
"value" : "Authenticating"
4558+
}
4559+
},
4560+
"zh-Hans" : {
4561+
"stringUnit" : {
4562+
"state" : "translated",
4563+
"value" : "Authenticating"
4564+
}
4565+
},
4566+
"zh-Hant" : {
4567+
"stringUnit" : {
4568+
"state" : "translated",
4569+
"value" : "Authenticating"
4570+
}
4571+
}
4572+
}
4573+
},
44494574
"AutomaticallyCreateSymbolicLink" : {
44504575
"localizations" : {
44514576
"ar" : {

Xcodes/XcodesKit/Sources/XcodesKit/Models/XcodeInstallationStep.swift

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Foundation
99

1010
// A numbered step
1111
public enum XcodeInstallationStep: Equatable, CustomStringConvertible {
12+
case authenticating
1213
case downloading(progress: Progress)
1314
case unarchiving
1415
case moving(destination: String)
@@ -22,6 +23,8 @@ public enum XcodeInstallationStep: Equatable, CustomStringConvertible {
2223

2324
public var message: String {
2425
switch self {
26+
case .authenticating:
27+
return localizeString("Authenticating")
2528
case .downloading:
2629
return localizeString("Downloading")
2730
case .unarchiving:
@@ -39,16 +42,17 @@ public enum XcodeInstallationStep: Equatable, CustomStringConvertible {
3942

4043
public var stepNumber: Int {
4144
switch self {
42-
case .downloading: return 1
43-
case .unarchiving: return 2
44-
case .moving: return 3
45-
case .trashingArchive: return 4
46-
case .checkingSecurity: return 5
47-
case .finishing: return 6
45+
case .authenticating: return 1
46+
case .downloading: return 2
47+
case .unarchiving: return 3
48+
case .moving: return 4
49+
case .trashingArchive: return 5
50+
case .checkingSecurity: return 6
51+
case .finishing: return 7
4852
}
4953
}
5054

51-
public var stepCount: Int { 6 }
55+
public var stepCount: Int { 7 }
5256
}
5357

5458
func localizeString(_ key: String, comment: String = "") -> String {

0 commit comments

Comments
 (0)