Skip to content

Commit

Permalink
Merge pull request #607 from firebase/otp
Browse files Browse the repository at this point in the history
Support OTP when targeting earlier versions of the iOS SDK
  • Loading branch information
morganchen12 authored Feb 5, 2019
2 parents e135f50 + 64d4bdb commit b853243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions PhoneAuth/FirebasePhoneAuthUI/FUICodeField.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ - (void)setUpFromNib {
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.inputField.userInteractionEnabled = YES;

#if __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
if (@available(iOS 12.0, *)) {
self.inputField.textContentType = UITextContentTypeOneTimeCode;
}
#endif // __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0

// Initialization code
_codeEntry = [NSMutableString string];
Expand Down Expand Up @@ -175,11 +173,9 @@ - (CGSize)intrinsicContentSize {
}

- (UITextContentType _Null_unspecified)textContentType {
#if __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
if (@available(iOS 12.0, *)) {
return UITextContentTypeOneTimeCode;
}
#endif // __IPHONE_OS_MIN_VERSION_REQUIRED > __IPHONE_12_0
return nil;
}

Expand Down
2 changes: 2 additions & 0 deletions UITests/FirebaseUISample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down Expand Up @@ -659,6 +660,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down

0 comments on commit b853243

Please sign in to comment.