[AltStore] Fixes presenting auth alert on background thread

This commit is contained in:
Riley Testut
2019-06-04 11:32:08 -07:00
parent cad955dd2d
commit 7c13c42d75

View File

@@ -168,6 +168,7 @@ private extension AppManager
func authenticate(presentingViewController: UIViewController, completionHandler: @escaping (Result<ALTTeam, Error>) -> Void) func authenticate(presentingViewController: UIViewController, completionHandler: @escaping (Result<ALTTeam, Error>) -> Void)
{ {
DispatchQueue.main.async {
let alertController = UIAlertController(title: "Enter Apple ID + Password", message: "", preferredStyle: .alert) let alertController = UIAlertController(title: "Enter Apple ID + Password", message: "", preferredStyle: .alert)
alertController.addTextField { (textField) in alertController.addTextField { (textField) in
textField.placeholder = "Apple ID" textField.placeholder = "Apple ID"
@@ -200,6 +201,7 @@ private extension AppManager
presentingViewController.present(alertController, animated: true, completion: nil) presentingViewController.present(alertController, animated: true, completion: nil)
} }
}
func fetchSigningResources(for app: App, team: ALTTeam, presentingViewController: UIViewController, completionHandler: @escaping (Result<(ALTCertificate, ALTProvisioningProfile), Error>) -> Void) func fetchSigningResources(for app: App, team: ALTTeam, presentingViewController: UIViewController, completionHandler: @escaping (Result<(ALTCertificate, ALTProvisioningProfile), Error>) -> Void)
{ {