Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Sources/XcodesKit/XcodeInstaller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public final class XcodeInstaller {
// session once we're ready to download Xcode. Doing that requires us to know the
// URL we want to download though (and we may not know that yet), so we don't need
// to do anything session-related quite yet.
return Promise()
return sessionService.loginIfNeeded()
}
}
.then { () -> Promise<Void> in
Expand All @@ -313,7 +313,12 @@ public final class XcodeInstaller {
case .xcodeReleases:
/// Now that we've used Xcode Releases to determine what URL we should use to
/// download Xcode, we can use that to establish an anonymous session with Apple.
return self.sessionService.validateADCSession(path: xcode.downloadPath).map { xcode }
// As of Nov 2022, the `validateADCSession` return 403 forbidden for Xcode versions (works with runtimes)
// return self.sessionService.validateADCSession(path: xcode.downloadPath).map { xcode }
// -------
// We need the cookies from its response in order to download Xcodes though,
// so perform it here first just to be sure.
return Current.network.dataTask(with: URLRequest.downloads).map { _ in xcode }
}
}
.then { xcode -> Promise<(Xcode, URL)> in
Expand Down