From a187c0f82e68bf4124e450f19fe375664894b7cd Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Thu, 4 Jan 2024 17:41:04 -0800 Subject: [PATCH] Remove iOS 12 availability checks --- .../Source/FlutterTextInputPlugin.mm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index 7168515b1a0d6..5137976f7033c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -304,14 +304,12 @@ static UITextContentType ToUITextContentType(NSArray* hints) { return UITextContentTypePassword; } - if (@available(iOS 12.0, *)) { - if ([hint isEqualToString:@"oneTimeCode"]) { - return UITextContentTypeOneTimeCode; - } + if ([hint isEqualToString:@"oneTimeCode"]) { + return UITextContentTypeOneTimeCode; + } - if ([hint isEqualToString:@"newPassword"]) { - return UITextContentTypeNewPassword; - } + if ([hint isEqualToString:@"newPassword"]) { + return UITextContentTypeNewPassword; } return hints[0]; @@ -407,11 +405,10 @@ static BOOL IsFieldPasswordRelated(NSDictionary* configuration) { return YES; } - if (@available(iOS 12.0, *)) { - if ([contentType isEqualToString:UITextContentTypeNewPassword]) { - return YES; - } + if ([contentType isEqualToString:UITextContentTypeNewPassword]) { + return YES; } + return NO; }