Comments (2)
@mattgabriel You can use patch-package to patch the library and force this one to use Stripe ~> 21.4.0
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)
• Remove the swift-5.0 search path, or you will get an error about undefined symbols (try it if you don't believe me), do this -> react-native-community/upgrade-support#62 (comment)
Ref: https://github.com/agaweb/react-native-stripe#additional-ios-setup
Everything should work after all of this !
from react-native-stripe-payments.
I m facing the same issue solved by updating the latest version of the stripe library
from react-native-stripe-payments.
Related Issues (20)
- Can't use chrome debugger HOT 5
- Component Exception: null is not an object (evaluating 'StripePayments.init') HOT 4
- CocoaPods could not find compatible versions for pod "react-native-stripe-payments" HOT 6
- Save Card Details HOT 2
- Is it possible to connect stripeAccount via stripe.setStripeAccount('stripe_acc_id') ? HOT 3
- TypeError: null is not an object (evaluating 'StripePayments.init') HOT 1
- J HOT 1
- Is it possible to create payment methods? (example in description) HOT 1
- Project scope? HOT 3
- Library gives an error HOT 7
- issue running module locally
- 'new' is unavailable: You cannot directly instantiate an STPIssuingCardPin HOT 1
- Link to official react native sdk in readme HOT 1
- Update version 14.2.1 of the SDK Stripe Android SDK (com.stripe: stripe-android) version 16.9.0, For security reasons according to Google HOT 2
- App Is Crashed On Android HOT 2
- Stored properties cannot be marked potentially unavailable with '@available' HOT 2
- URGENT - Android Build Fails When Targeting API LEVEL 31 & Above HOT 9
- Issue with library on xcode 14 HOT 1
- 'STPCardScanner' is only available in iOS 13 or newer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-stripe-payments.