Fix "server busy" pairing error dialog

This commit is contained in:
Cameron Gutman
2019-11-04 21:41:42 -08:00
parent e89707e601
commit 1757359fbf
3 changed files with 11 additions and 11 deletions

View File

@@ -56,8 +56,10 @@
}
static NSMutableSet* hostList;
- (void)showPIN:(NSString *)PIN {
dispatch_async(dispatch_get_main_queue(), ^{
- (void)startPairing:(NSString *)PIN {
// Needs to be synchronous to ensure the alert is shown before any potential
// failure callback could be invoked.
dispatch_sync(dispatch_get_main_queue(), ^{
self->_pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing"
message:[NSString stringWithFormat:@"Enter the following PIN on the host machine: %@", PIN]
preferredStyle:UIAlertControllerStyleAlert];