File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ public final class XcodeInstaller {
286
286
// session once we're ready to download Xcode. Doing that requires us to know the
287
287
// URL we want to download though (and we may not know that yet), so we don't need
288
288
// to do anything session-related quite yet.
289
- return Promise ( )
289
+ return sessionService . loginIfNeeded ( )
290
290
}
291
291
}
292
292
. then { ( ) -> Promise < Void > in
@@ -313,7 +313,12 @@ public final class XcodeInstaller {
313
313
case . xcodeReleases:
314
314
/// Now that we've used Xcode Releases to determine what URL we should use to
315
315
/// download Xcode, we can use that to establish an anonymous session with Apple.
316
- return self . sessionService. validateADCSession ( path: xcode. downloadPath) . map { xcode }
316
+ // As of Nov 2022, the `validateADCSession` return 403 forbidden for Xcode versions (works with runtimes)
317
+ // return self.sessionService.validateADCSession(path: xcode.downloadPath).map { xcode }
318
+ // -------
319
+ // We need the cookies from its response in order to download Xcodes though,
320
+ // so perform it here first just to be sure.
321
+ return Current . network. dataTask ( with: URLRequest . downloads) . map { _ in xcode }
317
322
}
318
323
}
319
324
. then { xcode -> Promise < ( Xcode , URL ) > in
You can’t perform that action at this time.
0 commit comments