-
Notifications
You must be signed in to change notification settings - Fork 30
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
Build error on Xcode 12.5 beta 2 #32
Comments
@mattgabriel You can use patch-package to patch the library and force this one to use Some extra changes need to be applied because Stripe is now in Swift. diff --git a/node_modules/react-native-stripe-payments/ios/StripePayments.h b/node_modules/react-native-stripe-payments/ios/StripePayments.h
index f1d3301..322e3ec 100644
--- a/node_modules/react-native-stripe-payments/ios/StripePayments.h
+++ b/node_modules/react-native-stripe-payments/ios/StripePayments.h
@@ -1,6 +1,6 @@
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
-#import <Stripe/Stripe.h>
+@import Stripe;
@interface StripePayments : NSObject<RCTBridgeModule, STPAuthenticationContext>
diff --git a/node_modules/react-native-stripe-payments/ios/StripePayments.m b/node_modules/react-native-stripe-payments/ios/StripePayments.m
index d0142c2..7261999 100644
--- a/node_modules/react-native-stripe-payments/ios/StripePayments.m
+++ b/node_modules/react-native-stripe-payments/ios/StripePayments.m
@@ -8,7 +8,7 @@ @implementation StripePayments
RCT_EXPORT_METHOD(init:(NSString *)publishableKey)
{
- [Stripe setDefaultPublishableKey:publishableKey];
+ [StripeAPI setDefaultPublishableKey:publishableKey];
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isCardValid:(NSDictionary *)cardParams)
diff --git a/node_modules/react-native-stripe-payments/react-native-stripe-payments.podspec b/node_modules/react-native-stripe-payments/react-native-stripe-payments.podspec
index 2f2f6a3..7c9b694 100644
--- a/node_modules/react-native-stripe-payments/react-native-stripe-payments.podspec
+++ b/node_modules/react-native-stripe-payments/react-native-stripe-payments.podspec
@@ -19,6 +19,5 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.dependency "React"
- s.dependency "Stripe", "~> 19.0"
+ s.dependency "Stripe", "~> 21.4.0"
end
- • Create the famous "Dummy" swift file (xcode -> open your project -> right click on the folder named after your project, where Info.plist resides -> new File -> Swift -> say YES when asked for the bridging header) Ref: https://github.com/agaweb/react-native-stripe#additional-ios-setup Everything should work after all of this ! |
I m facing the same issue solved by updating the latest version of the stripe library |
Error:
'new' is unavailable: You cannot directly instantiate an STPIssuingCardPin
This is using react-native-stripe-payments version
1.0.6
. Which requires Stripe~>19.0
.Apparently Stripe issued a fix for this on version
21.4.0
, however when trying to force react-native-stripe-payments to use this latest version (Podfile:pod 'Stripe', '~> 21.4.0'
) throws the error below:Any ideas?
The text was updated successfully, but these errors were encountered: