@@ -525,7 +525,7 @@ class AppState: ObservableObject {
525525 // MARK: - Install
526526
527527 func checkMinVersionAndInstall( id: XcodeID ) {
528- guard let availableXcode = availableXcodes. first ( where: { $0. version == id. version } ) else { return }
528+ guard let availableXcode = availableXcodes. first ( where: { $0. xcodeID == id } ) else { return }
529529
530530 // Check to see if users macOS is supported
531531 if let requiredMacOSVersion = availableXcode. requiredMacOSVersion {
@@ -552,7 +552,7 @@ class AppState: ObservableObject {
552552 }
553553
554554 func install( id: XcodeID ) {
555- guard let availableXcode = availableXcodes. first ( where: { $0. version == id. version } ) else { return }
555+ guard let availableXcode = availableXcodes. first ( where: { $0. xcodeID == id } ) else { return }
556556
557557 installationPublishers [ id] = signInIfNeeded ( )
558558 . handleEvents (
@@ -627,7 +627,7 @@ class AppState: ObservableObject {
627627 /// Skips using the username/password to log in to Apple, and simply gets a Auth Cookie used in downloading
628628 /// As of Nov 2022 this was returning a 403 forbidden
629629 func installWithoutLogin( id: Xcode . ID ) {
630- guard let availableXcode = availableXcodes. first ( where: { $0. version == id. version } ) else { return }
630+ guard let availableXcode = availableXcodes. first ( where: { $0. xcodeID == id } ) else { return }
631631
632632 installationPublishers [ id] = self . install ( . version( availableXcode) , downloader: Downloader ( rawValue: Current . defaults. string ( forKey: " downloader " ) ?? " aria2 " ) ?? . aria2)
633633 . receive ( on: DispatchQueue . main)
@@ -650,7 +650,7 @@ class AppState: ObservableObject {
650650 }
651651
652652 func cancelInstall( id: Xcode . ID ) {
653- guard let availableXcode = availableXcodes. first ( where: { $0. version == id. version } ) else { return }
653+ guard let availableXcode = availableXcodes. first ( where: { $0. xcodeID == id } ) else { return }
654654
655655 // Cancel the publisher
656656 installationPublishers [ id] = nil
@@ -894,7 +894,7 @@ class AppState: ObservableObject {
894894 }
895895 . map { availableXcode -> Xcode in
896896 let installedXcode = installedXcodes. first ( where: { installedXcode in
897- availableXcode. version. isEquivalent ( to: installedXcode. version)
897+ availableXcode. version. isEquivalent ( to: installedXcode. version)
898898 } )
899899
900900 let identicalBuilds : [ XcodeID ]
0 commit comments