-
Notifications
You must be signed in to change notification settings - Fork 996
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
Unable to subclass STPPaymentCardTextField #1768
Comments
Thanks for the report @mvarie, I've got a fix for this that we'll include in the next release |
@csabol-stripe Thanks for looking at this! Is there a timeline for the next release? 🙏 |
This should be fixed in 21.4.0. |
21.4.0 doesn't fix it though: fbd12ae only made the class |
Sorry, we totally missed that. :( We'll issue another update very soon. |
@devesh-stripe When we can expect the next release with this fix? |
If I try to subclass this I get exc_bad_access in |
Please try 21.5.0, this should be fixed. |
Hey @davidme-stripe
|
Yeah, we also need to override |
@davidme-stripe Any update on this? |
Summary
It seems that it is now impossible to subclass
STPPaymentCardTextField
.The compile-time error is:
This also makes it impossible to override in a subclass methods that are intended to be overridden by design, such as
brandImageForCardBrand
,cvcImageForCardBrand
,errorImageForCardBrand
and others.Stripe Reference > STPPaymentCardTextField Class Reference > brandImageForCardBrand:
Stripe Reference > STPPaymentCardTextField Class Reference > cvcImageForCardBrand:
Stripe Reference > STPPaymentCardTextField Class Reference > errorImageForCardBrand:
Code to reproduce
class MYPaymentCardTextField: STPPaymentCardTextField{}
iOS version
14.4
Installation method
Swift Package Manager
SDK version
21.3.1
Other information
It didn't happen with SDK version 20.1.1 (which was still objc apparently), it started happening when upgrading from 20.1.1 to 21.3.1.
Class in swift file is marked as
public
, but it should be probably marked asopen
. Emphasis mine:Source: The Swift Programming Language - Access Control
The text was updated successfully, but these errors were encountered: