fix: Allow non-paid Apple Developers to download

This commit is contained in:
Matt Kiazyk 2021-10-27 08:30:43 -05:00
parent 22c390b666
commit e8fd83032b
No known key found for this signature in database
GPG key ID: 33D9938D5D45EFE2

View file

@ -151,9 +151,12 @@ public class Client {
.map(\.data)
.decode(type: AppleSession.self, decoder: JSONDecoder())
.tryMap { session in
if session.provider == nil {
throw AuthenticationError.notDeveloperAppleId
}
// A user that is a non-paid Apple Developer will have a provider == nil
// Those users can still download Xcode.
// Non Apple Developers will get caught in the download as invalid
// if session.provider == nil {
// throw AuthenticationError.notDeveloperAppleId
// }
}
.eraseToAnyPublisher()
}