Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7ca9e4e

Browse files
Evsio0nEvsio0n
authored andcommitted
Set limitation to iOS 11 due to UITextContentTypeUsername is Up at iOS 11
1 parent 785699a commit 7ca9e4e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static UITextAutocapitalizationType ToUITextAutoCapitalizationType(NSDictionary*
4545
return UITextAutocapitalizationTypeNone;
4646
}
4747

48-
@available iOS (10.0,*)
48+
@available iOS (11.0,*)
4949
static UITextContentType ToUITextContentType(NSDictionary* type) {
5050
NSString* contentType = type[@"textType"];
5151
if ([contentType isEqualToString:@"TextContent.username"])
@@ -157,11 +157,11 @@ @interface FlutterTextInputView : UIView <UITextInput>
157157
@property(nonatomic, copy) NSDictionary* markedTextStyle;
158158
@property(nonatomic, assign) id<UITextInputDelegate> inputDelegate;
159159
/**
160-
This file is to make ios 10 or higher device using autofill
160+
This file is to make ios 11 or higher device using autofill
161161
162162
Reference to github.com/flutter/flutter/issues/33040
163163
**/
164-
@property(nonatomic) UITextContentType textContentType API_AVAILABLE(ios(10.0));
164+
@property(nonatomic) UITextContentType textContentType API_AVAILABLE(ios(11.0));
165165

166166

167167
// UITextInputTraits
@@ -205,7 +205,7 @@ - (instancetype)init {
205205
_enablesReturnKeyAutomatically = NO;
206206
_keyboardAppearance = UIKeyboardAppearanceDefault;
207207
_keyboardType = UIKeyboardTypeDefault;
208-
if(@available iOS (10.0,*))
208+
if(@available iOS (11.0,*))
209209
_keyboardContentType = UITextContentType;
210210
_returnKeyType = UIReturnKeyDone;
211211
_secureTextEntry = NO;
@@ -770,7 +770,7 @@ - (void)hideTextInput {
770770

771771
- (void)setTextInputClient:(int)client withConfiguration:(NSDictionary*)configuration {
772772
NSDictionary* inputType = configuration[@"inputType"];
773-
if(@available iOS (10.0,*))
773+
if(@available iOS (11.0,*))
774774
NSDictionary* contentType = configuration[@"contentType"];
775775
NSString* keyboardAppearance = configuration[@"keyboardAppearance"];
776776
if ([configuration[@"obscureText"] boolValue]) {
@@ -780,7 +780,7 @@ - (void)setTextInputClient:(int)client withConfiguration:(NSDictionary*)configur
780780
}
781781

782782
_activeView.keyboardType = ToUIKeyboardType(inputType);
783-
if(@available iOS (10.0,*))
783+
if(@available iOS (11.0,*))
784784
_activeView.textContentType = ToUITextContentType(contentType);
785785
_activeView.returnKeyType = ToUIReturnKeyType(configuration[@"inputAction"]);
786786
_activeView.autocapitalizationType = ToUITextAutoCapitalizationType(configuration);

0 commit comments

Comments
 (0)