【发布时间】:2021-10-11 12:29:58
【问题描述】:
- SDK 版本:42.0.1
- 平台:iOS (v. 14.7.1)
- 设备:iPhone 12 pro max ;
大家好!经过多次尝试将 iOS 的自动填充功能与 TextInput 组件的 prop newPassword 集成,我终于决定寻求帮助。
我有一个包含三个字段的简单注册表:
- 用户名
- 密码
- 密码验证
这是最简单的代码,它应该可以工作,但不能:
<View style={styles.container}>
<TextInput
style={styles.input}
textContentType="username"
placeholder="username"
/>
<TextInput
style={styles.input}
placeholder="password"
textContentType="newPassword"
/>
<TextInput
style={styles.input}
placeholder="confirm password"
textContentType="newPassword"
/>
<TouchableOpacity onPress={handleSubmit} >
<Text>
submit
</Text>
</TouchableOpacity>
</View>
预期行为:
我希望密码自动填充功能在具有如下 newPassword 属性的两个输入之一的焦点处触发:
事实上,上面的截图来自在 Expo 下运行的应用程序,该功能运行良好。
我指定当我触摸输入用户名时,自动填充密码仅适用于第一个输入密码,如下所示:
好的,现在当我构建我的应用程序以通过 TestFligth 对其进行测试时,这些功能根本不起作用。我知道有一些配置需要设置:
我手机的钥匙串已激活。
AutoFill Credential Provider 在 App ID 配置中处于活动状态
这是我的 app.json iOS 配置:
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.myIdentifier.identifier",
"buildNumber": "1.0.4",
"associatedDomains": [
"applinks:www.mywebsite.com",
"webcredentials:www.mywebsite.com"
],
"entitlements": {
"com.apple.developer.networking.wifi-info": "true"
},
},
我似乎找不到丢失的地方!也许在 app.json 中?
【问题讨论】:
-
你有办法解决这个问题吗?我在同一条船上
-
很遗憾,我从来没有这样做过
标签: ios react-native passwords expo