facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.58k stars 24.37k forks source link

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

Open Gambitboy opened 1 year ago

Gambitboy commented 1 year ago

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:

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

Gambitboy commented 1 year ago

Bump, any assistance?

Gambitboy commented 1 year ago

I'm having the same issue with OTP autofill working in debug mode but doesnt work for release mode

gunnartorfis commented 1 year ago

Same here. I'm not sure what the expected behaviour is on iOS but on Android I'd assume it is meant to pretty well integrated. When using the prop with React Native Web, it gets auto-filled as expected on Chrome (Android).

eminsr commented 1 year ago

The issue persists in version 0.72.5 and autoComplete="cc-number" also changes the keyboardType

jhta commented 9 months ago

same here

simgill commented 9 months ago

same

phillipkey commented 9 months ago

I'm seeing this issue on React Native 0.69.0. The fields work fine for android but nothing on iOS.

I've been searching to see if there's something that needs to be added to the app's configuration to enable the permission since I believe it's using the keychain.

andreassh commented 5 months ago

same on v0.73.4

Gambitboy commented 1 month ago

Android is working on 0.76.1

Gambitboy commented 1 month ago

iOS still broken