【问题标题】:React Native Expo iOS Use Strong Password feature not workingReact Native Expo iOS 使用强密码功能不起作用
【发布时间】: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


【解决方案1】:

尝试使用 textContentType="oneTimeCode",如therehere 但这对我没有帮助

【讨论】:

  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
  • 这并不能真正回答问题。如果您有其他问题,可以点击 提问。要在此问题有新答案时收到通知,您可以follow this question。一旦你有足够的reputation,你也可以add a bounty 来引起对这个问题的更多关注。 - From Review
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-15
  • 2020-03-21
  • 1970-01-01
  • 2018-10-23
  • 1970-01-01
相关资源
最近更新 更多