diff --git a/packages/local_auth/CHANGELOG.md b/packages/local_auth/CHANGELOG.md index b4d58395295f..35ddb67d830b 100644 --- a/packages/local_auth/CHANGELOG.md +++ b/packages/local_auth/CHANGELOG.md @@ -1,8 +1,7 @@ -## 1.1.0 - * Migrate to null safety. * Allow pin, passcode, and pattern authentication with `authenticate` method. * Fix incorrect error handling switch case fallthrough. +* Fix crash on biometric lockout * Update README for Android Integration. * Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets. * Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276)). diff --git a/packages/local_auth/ios/Classes/FLTLocalAuthPlugin.m b/packages/local_auth/ios/Classes/FLTLocalAuthPlugin.m index cda49a7d68c3..17f00a98db9d 100644 --- a/packages/local_auth/ios/Classes/FLTLocalAuthPlugin.m +++ b/packages/local_auth/ios/Classes/FLTLocalAuthPlugin.m @@ -69,9 +69,14 @@ - (void)alertMessage:(NSString *)message }]; [alert addAction:additionalAction]; } - [[UIApplication sharedApplication].delegate.window.rootViewController presentViewController:alert - animated:YES - completion:nil]; + @try { + dispatch_async(dispatch_get_main_queue(), ^{ + [[UIApplication sharedApplication].delegate.window.rootViewController presentViewController:alert animated:YES completion:nil]; + }); + } @catch (NSException *exception) { + NSLog(@"Exception presentViewController: %@", exception); + } @finally { + } } - (void)getAvailableBiometrics:(FlutterResult)result {