From 000119dea0489b2c308a774f5fa1d907c2347875 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Thu, 21 Feb 2019 23:09:52 -0800 Subject: [PATCH] Fix build error warning of Text module (#23586) Summary: Throw error warning when build Text module, we can add tvOS available check to remove error. [iOS] [Fixed] - Fix build error warning of Text module Pull Request resolved: https://github.com/facebook/react-native/pull/23586 Differential Revision: D14181198 Pulled By: cpojer fbshipit-source-id: 6a62c831ba119ddcbc6effa0b24f22bd4588b982 --- Libraries/Text/TextInput/RCTBaseTextInputView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index a0621bfea53fa4..bbee808e7ca5ca 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -235,7 +235,7 @@ - (void)setTextContentType:(NSString *)type }; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */ - if (@available(iOS 11.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { NSDictionary * iOS11extras = @{@"username": UITextContentTypeUsername, @"password": UITextContentTypePassword}; @@ -247,7 +247,7 @@ - (void)setTextContentType:(NSString *)type #endif #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 120000 /* __IPHONE_12_0 */ - if (@available(iOS 12.0, *)) { + if (@available(iOS 12.0, tvOS 12.0, *)) { NSDictionary * iOS12extras = @{@"newPassword": UITextContentTypeNewPassword, @"oneTimeCode": UITextContentTypeOneTimeCode};