-
Notifications
You must be signed in to change notification settings - Fork 994
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
Unresolved external in react-native project using stripe-ios #1732
Comments
Any thoughts on this one, or things you'd like me to do to follow up? If I modify this code in STPPhoneNumberValidator:
to essentially remove the use of scanUpToString, it compiles and functions.
It really does seem like it SHOULD work as is, and perhaps is somehow related to ios version targets (I've tried setting them but that didn't help, but I know there are 50 places it might belong). |
This seems to be the issue, though I can't claim to understand it. |
Thanks for the detailed report! From the linked issue, it looks like React Native may be compiling against the wrong version of the Swift standard library. I'll investigate. |
I still can't reproduce this locally, but it seems like the linked workaround of removing |
@davidme-stripe then react-native-linear-gradient failed in build. Library not found for -lBVLinearGradient |
I believe React Native has fixed this on their end — they shouldn't be specifying Swift 5.0 on newer versions of Xcode. |
Summary
While trying to compile a project using react-native and SDK version 21.1.0, I get this error:
Undefined symbols for architecture x86_64:
"(extension in Foundation):__C.NSScanner.scanUpToString(Swift.String) -> Swift.String?", referenced from:
static Stripe.STPPhoneNumberValidator.formattedRedactedPhoneNumber(for: Swift.String, forCountryCode: Swift.String?) -> Swift.String in libStripe.a(STPPhoneNumberValidator.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Code to reproduce
I have not produced a standalone test yet, but it seems this happens on a vanilla RN project.
iOS version
13, 14
Installation method
CocoaPods
SDK version
21.1.0
Other information
I am trying to use the Stripe SDK from a swift file in a react-native app, which is likely somehow related.
The text was updated successfully, but these errors were encountered: