Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot write CC expiration date from Simulator running on a Intel based Mac #415

Open
lechuckcaptain opened this issue Jun 22, 2023 · 8 comments

Comments

@lechuckcaptain
Copy link

lechuckcaptain commented Jun 22, 2023

Braintree Drop-in SDK Version

9.8.2

Environment

Sandbox

Xcode Version

14.3.1

OS Version & Device

iPhone 14 PRO - iOS 16.4 Simulator

Integration type

Swfit Package Manager

Development Processor

Intel

Describe the bug

It seems that on a iOS simulator run on an Intel based Mac it's not possible to correctly enter the credit card expiration date. Only the first char gets displayed and no other characters are accepted.
It seems that sometime, as a workaround, it's possible to paste the expiration date string value from the clipboard and it gets accepted.

From an Arm based Mac everything seems to work without any issue.

To reproduce

  • Start the Demo app
  • Add a new payment method
  • Select Credit card or debit
  • Fill the card details

Expected behavior

It should be possible to manually enter the credit card expiration date also on a iOS simulator run on Intel based Mac.

Screenshots

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-06-22.at.18.13.24.mp4
@lechuckcaptain lechuckcaptain changed the title Cannot write expiring date from Intel machine on Simulator Cannot write CC expiration date from Simulator running on a Intel based Mac Jun 22, 2023
@scannillo
Copy link
Contributor

👋 Hi @lechuckcaptain - thank you for opening this issue and for the thorough details + video! We will test on an Intel Mac to see if we can replicate and get back to you.

@lechuckcaptain
Copy link
Author

👋 Hi @scannillo, thank you for the answer. Please let me know if you need any support troubleshooting the issue.

@via-guy
Copy link

via-guy commented Jul 6, 2023

@scannillo we're having this issue too using the iOS 16.4 or later. It doesn't happen to us on a simulator running iOS 16.2 or earlier.
We're actually using BraintreeDropIn/UIKit (8.2.0), but we see the same issue, and it's clearly coming from different versions of iOS. This is what happens when you hack internal implementations of Apple's SDKs...

@via-guy
Copy link

via-guy commented Jul 7, 2023

We resolved the issue by not using the editDelegate to check for when backspace was pressed. Instead in textField(_:shouldChangeCharactersIn:replacementString:) we check string.isEmpty && range.length > 0 to see if the user is deleting a character and pass that into BTUIKCardExpiryFormat.backspace.

@lechuckcaptain
Copy link
Author

lechuckcaptain commented Aug 9, 2023

Hey @scannillo, sorry to bother you, do you have any updates on this issue?

@scannillo
Copy link
Contributor

👋 Hi @lechuckcaptain - did you try the new Xcode 15 beta?

@lechuckcaptain
Copy link
Author

lechuckcaptain commented Aug 17, 2023

Hey @scannillo, on the latest Xcode 15 beta 6 with default iOS simulator (iPhone 14 Pro iOS 17.0) the issue is still present 😢

Screen.Recording.2023-08-17.at.12.36.02.mov

@scannillo
Copy link
Contributor

scannillo commented Aug 17, 2023

I created a ticket with our team for this (DTBTSDK-2913 for tracking). However to be honest, since this only happens Intel simulators and not Apple Silicon machines (sounds like an Xcode bug) or real devices, there are many other tasks on our roadmap that have to take priority over this one right now.

We do welcome PRs though if you have the time to take a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants