Skip to content

Commit 2e33b33

Browse files
committed
Fix missing availability checkc
1 parent a798d11 commit 2e33b33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

PhoneAuth/FirebasePhoneAuthUI/FUICodeField.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ - (void)commonInit {
5555
UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, self.bounds.size.height)];
5656
self.leftView = paddingView;
5757
self.leftViewMode = UITextFieldViewModeAlways;
58-
self.textContentType = UITextContentTypeOneTimeCode;
58+
if (@available(iOS 12.0, *)) {
59+
self.textContentType = UITextContentTypeOneTimeCode;
60+
}
5961

6062
// Default values
6163
if (!self.codeLength) {
@@ -72,7 +74,7 @@ - (void)commonInit {
7274
[self updateText];
7375
}
7476

75-
- (UIKeyboardType) keyboardType {
77+
- (UIKeyboardType)keyboardType {
7678
if (@available(iOS 10, *)) {
7779
return UIKeyboardTypeASCIICapableNumberPad;
7880
} else {

0 commit comments

Comments
 (0)