react / react/react-native

(iOS) autoComplete="cc-number" is not doing anything to allow autofill

未关闭
#36,089 15 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Component: TextInput Issue: Author Provided Repro Needs: Triage :mag:
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

I've been trying to implement an TextInput for Credit Card Number that allows the users to autofill it using whatever password manager they use on their device.

I've tried different variations and props but its not working.

In my Snack it works when its running in web.
Tested on a physical android devices it works.
Tested on a physical iOS device it did not work.

Is this how its supposed to work or am I doing something wrong?

Version

0.76.1

Output of npx react-native info

System:
OS: macOS 15.1
CPU: (10) arm64 Apple M1 Pro
Memory: 494.67 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.7.0
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.8.2
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.10.28.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/keatonroux/.rvm/gems/ruby-3.3.5/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.1
- iOS 18.1
- macOS 15.1
- tvOS 18.1
- visionOS 2.1
- watchOS 11.1
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.21829.142.2421.12409432
Xcode:
version: 16.1/16B40
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /Users/keatonroux/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 3.3.5
path: /Users/keatonroux/.rvm/rubies/ruby-3.3.5/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.0
wanted: 15.0.0
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.1
wanted: 0.76.1
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

Steps to reproduce
  1. Init blank template
  2. Create TextInput
  3. Set autoComplete prop to "cc-number"
Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/x9JtUAYkj
snack.expo.dev/@tushetv/adequate-orange-tortillas

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 Snack 开始,在实体 iOS 设备上复现带有 autoComplete="cc-number" 的 TextInput,并与报告的 Web 和 Android 行为进行比较。确定此 prop 是否应当在 iOS 上启用信用卡自动填充;当平台行为以及任何所需的 React Native 更改都得到明确确定时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。