diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index 025fb0e4168c8f..d9c47ff16311d4 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -402,17 +402,16 @@ - (void)didMoveToWindow - (void)didSetProps:(NSArray *)changedProps { - #if !TARGET_OS_TV if ([changedProps containsObject:@"inputAccessoryViewID"] && self.inputAccessoryViewID) { [self setCustomInputAccessoryViewWithNativeID:self.inputAccessoryViewID]; } else if (!self.inputAccessoryViewID) { [self setDefaultInputAccessoryView]; } - #endif } - (void)setCustomInputAccessoryViewWithNativeID:(NSString *)nativeID { + #if !TARGET_OS_TV __weak RCTBaseTextInputView *weakSelf = self; [_bridge.uiManager rootViewForReactTag:self.reactTag withCompletion:^(UIView *rootView) { RCTBaseTextInputView *strongSelf = weakSelf; @@ -425,10 +424,12 @@ - (void)setCustomInputAccessoryViewWithNativeID:(NSString *)nativeID } } }]; + #endif /* !TARGET_OS_TV */ } - (void)setDefaultInputAccessoryView { + #if !TARGET_OS_TV UIView *textInputView = self.backedTextInputView; UIKeyboardType keyboardType = textInputView.keyboardType; @@ -467,6 +468,7 @@ - (void)setDefaultInputAccessoryView textInputView.inputAccessoryView = nil; } [self reloadInputViewsIfNecessary]; + #endif /* !TARGET_OS_TV */ } - (void)reloadInputViewsIfNecessary