React native ReactNative textcontenttype iOS 13问题
我们无法获得电子邮件、姓名、电话号码建议(自动完成)来处理我们的React Native。有人能帮我们排除故障,看看我们这里可能出了什么问题吗React native ReactNative textcontenttype iOS 13问题,react-native,autofill,ios13,React Native,Autofill,Ios13,我们无法获得电子邮件、姓名、电话号码建议(自动完成)来处理我们的React Native。有人能帮我们排除故障,看看我们这里可能出了什么问题吗 (onChange('first_name',firstname))} value={state.form.first_name} autoCapitalize=“words” 占位符文本颜色={'#262626'} style={style.textInput} /> 它在iOS 13中确实有效。只需使用此处描述的设置,并将其从Swift转换为Rea
(onChange('first_name',firstname))}
value={state.form.first_name}
autoCapitalize=“words”
占位符文本颜色={'#262626'}
style={style.textInput}
/>
它在iOS 13中确实有效。只需使用此处描述的设置,并将其从Swift转换为React Native:
电话号码:
autoCorrect={true}
textContentType="telephoneNumber"
keyboardType="numbers-and-punctuation"
电邮:
autoCorrect={true}
textContentType="emailAddress"
keyboardType="email-address"
对于Android,您需要使用不同的键盘类型,因此可能类似于:
keyboardType={(Platform.OS === 'ios') ? "numbers-and-punctuation" : 'phone-pad"}
- 在Android中,我们可以使用
prop和支持的类型 它包括:autoCompleteType
<TextInput
autoCorrect={true}
keyboardType={'phone-pad'}
autoCompleteType={"tel"}
/>
<TextInput
autoCorrect={true}
keyboardType={'phone-pad'}
textContentType={"telephoneNumber"}
/>
你在手机上测试输入吗?是的,我在iOS 12和iOS 13上测试。在iOS 12上工作,但在iOS 13上不工作。这似乎是iOS 13的一个普遍问题。它与ReactNative没有任何关系。@JoachimDeelen,我在开发的应用程序中看到过这个问题,但我很难证明其他人也遇到了这个问题,而不是其他人。你有更多的证据证明发生了什么吗?是的,@Chirag这是与iOS 13或+相关的问题。不特定于任何react本机版本。在iOS 12或更低版本的设备中尝试相同的代码可以正常工作。此外,苹果在其文档中指定此iOS更新与隐私和安全问题有关。许多开发者正在苹果论坛上制造问题。这将在他们的下一次更新中很快得到解决。甚至在注册时,snapchat auto fil也停止了工作。我尝试了textContentType和keyboardType的不同组合,以使一切正常。例如,textContentType=“streetAddressLine1”需要keyboardType=“name phone pad”才能工作。
<TextInput
autoCorrect={true}
keyboardType={'phone-pad'}
textContentType={"telephoneNumber"}
/>
<TextInput
autoCorrect={true}
keyboardType={'phone-pad'}
autoCompleteType={"tel"}
textContentType={"telephoneNumber"}
/>