Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native ReactNative textcontenttype iOS 13问题_React Native_Autofill_Ios13 - Fatal编程技术网

React native ReactNative textcontenttype iOS 13问题

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

我们无法获得电子邮件、姓名、电话号码建议(自动完成)来处理我们的React Native。有人能帮我们排除故障,看看我们这里可能出了什么问题吗

(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中,我们可以使用
    autoCompleteType
    prop和支持的类型 它包括:

所以,如果我谈论android中的电话号码建议,我们可以使用

<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"}
/>