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
Does not conform to protocol 'STPPaymentContextDelegate' #1048
Comments
Hi @alexgerrese, I'm having trouble reproducing your issue. I tried Xcode 10.1 (10B61) (since you mentioned you're using the iOS 12.1 SDK), and Xcode's fixit created stubs that caused the compile error to go away. I also tried in our cocoapod installation test project, and it's working correctly there too. Any chance that cleaning the build folder in Xcode fixes the issue? I also compared your method signatures to the ones in our sample code, and they're an exact match, so I'd expect it to be working for you. Dan PS: I think this is a different issue than #454 |
Cleaning doesn't fix the issue unfortunately. I'm declaring the stubs in an extension of the ViewController so I thought that might have been the issue, but even when moving them to the original VC file the error persists. I'm importing Stripe in both files, I'm adhering to the STPPaymentContextDelegate, and my stubs are correctly typed, so I'm very confused as to what's going on. I've even created a new Swift file that attempts to conform to the delegate, but even here it gives me the error so this must be a larger project issue. `import Foundation class StripeTest: UIViewController, STPPaymentContextDelegate {
}` I'm also on Stripe cocoapods version 14.0.0 so I should be up-to-date. |
Hi @alexgerrese, I don't think there's anything I can do to help. You might try creating a brand new project and installing the Stripe pod via cocoapods. You should be able to verify that your That'd also give you a point of reference for comparing if there are any differences between the working & non-working projects related to the cocoapods integration: the Pods project, the xcconfig files, etc. We can't provide support for cocoapods or swiftc/Xcode, but if you run into other problems while integrating, feel free to reach out to our support at https://support.stripe.com/ Thanks, |
In my case solution is to use explicit |
Protocol 'CardSectionWithScannerViewDelegate' requires 'didScanCard(cardParams:)' to be available in iOS 12.0.0 and newer |
Summary
I have implemented the required protocols for STPPaymentContextDelegate but Xcode keeps asking me to add protocol stubs for "didFailToLoadWithError" and "didFinishWith" methods. When I let Xcode fill in the stubs, the error recursively reappears.
Code to reproduce
`// MARK: STPPaymentContextDelegate
iOS version
iOS 12.1
Installation method
Cocoapods
SDK version
14.0.0
The text was updated successfully, but these errors were encountered: