Skip to content

Commit 1eb511c

Browse files
committed
Do not block FirebaseAuth thread execution while validating phone number.
1 parent 620a189 commit 1eb511c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

FirebasePhoneAuthUI/FUIPhoneEntryViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ - (void)onNext:(NSString *)phoneNumber {
196196
if ([NSThread isMainThread]) {
197197
completionBlock();
198198
} else {
199-
dispatch_sync(dispatch_get_main_queue(), completionBlock);
199+
dispatch_async(dispatch_get_main_queue(), completionBlock);
200200
}
201201
}];
202202
}

FirebasePhoneAuthUI/FUIPhoneVerificationViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ - (IBAction)onResendCode:(id)sender {
163163
if ([NSThread isMainThread]) {
164164
completionBlock();
165165
} else {
166-
dispatch_sync(dispatch_get_main_queue(), completionBlock);
166+
dispatch_async(dispatch_get_main_queue(), completionBlock);
167167
}
168168
}];
169169
}

0 commit comments

Comments
 (0)