From a9585971c35799b06501fe5bba1cf584d000d27b Mon Sep 17 00:00:00 2001 From: Xiangtian Dai Date: Thu, 19 Oct 2017 08:58:36 -0700 Subject: Silences unguarded availability warnings in Auth. (#389) Also fixes a crash in the Auth sample app in an error case. This addresses *Auth* part of #385 . --- Example/Auth/Sample/MainViewController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Example/Auth') diff --git a/Example/Auth/Sample/MainViewController.m b/Example/Auth/Sample/MainViewController.m index e885e5a..5e739b7 100644 --- a/Example/Auth/Sample/MainViewController.m +++ b/Example/Auth/Sample/MainViewController.m @@ -2537,7 +2537,9 @@ static NSDictionary *parseURL(NSString *urlString) { if (error) { [self logFailure:@"failed to send verification code" error:error]; [self showMessagePrompt:error.localizedDescription]; - completion(error); + if (completion) { + completion(error); + } return; } [self logSuccess:@"Code sent"]; -- cgit v1.2.3