Skip to content

Commit b853243

Browse files
authored
Merge pull request #607 from firebase/otp
Support OTP when targeting earlier versions of the iOS SDK
2 parents e135f50 + 64d4bdb commit b853243

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

PhoneAuth/FirebasePhoneAuthUI/FUICodeField.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ - (void)setUpFromNib {
5959
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
6060
self.inputField.userInteractionEnabled = YES;
6161

62-
#if __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
6362
if (@available(iOS 12.0, *)) {
6463
self.inputField.textContentType = UITextContentTypeOneTimeCode;
6564
}
66-
#endif // __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
6765

6866
// Initialization code
6967
_codeEntry = [NSMutableString string];
@@ -175,11 +173,9 @@ - (CGSize)intrinsicContentSize {
175173
}
176174

177175
- (UITextContentType _Null_unspecified)textContentType {
178-
#if __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
179176
if (@available(iOS 12.0, *)) {
180177
return UITextContentTypeOneTimeCode;
181178
}
182-
#endif // __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
183179
return nil;
184180
}
185181

UITests/FirebaseUISample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@
600600
isa = XCBuildConfiguration;
601601
buildSettings = {
602602
ALWAYS_SEARCH_USER_PATHS = NO;
603+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
603604
CLANG_ANALYZER_NONNULL = YES;
604605
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
605606
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -659,6 +660,7 @@
659660
isa = XCBuildConfiguration;
660661
buildSettings = {
661662
ALWAYS_SEARCH_USER_PATHS = NO;
663+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
662664
CLANG_ANALYZER_NONNULL = YES;
663665
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
664666
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";

0 commit comments

Comments
 (0)