-
Notifications
You must be signed in to change notification settings - Fork 106
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
TypeError: null is not an object (evaluating '_reactNativeBraintreeDropinUi.default.show') #91
Comments
+1 |
@wgltony Any idea what could be wrong? |
+1 |
Just figured this out and wanted to share… When React Native removed
To fix, you can apply the following patch via diff --git a/node_modules/react-native-braintree-dropin-ui/ios/RNBraintreeDropIn.podspec b/node_modules/react-native-braintree-dropin-ui/RNBraintreeDropIn.podspec
similarity index 85%
rename from node_modules/react-native-braintree-dropin-ui/ios/RNBraintreeDropIn.podspec
rename to node_modules/react-native-braintree-dropin-ui/RNBraintreeDropIn.podspec
index 8835268..cdd07e7 100644
--- a/node_modules/react-native-braintree-dropin-ui/ios/RNBraintreeDropIn.podspec
+++ b/node_modules/react-native-braintree-dropin-ui/RNBraintreeDropIn.podspec
@@ -1,17 +1,17 @@
Pod::Spec.new do |s|
s.name = "RNBraintreeDropIn"
- s.version = "1.0.0"
+ s.version = "1.1.3"
s.summary = "RNBraintreeDropIn"
s.description = <<-DESC
RNBraintreeDropIn
DESC
s.homepage = "https://github.com/bamlab/react-native-braintree-payments-drop-in"
s.license = "MIT"
- # s.license = { :type => "MIT", :file => "../LICENSE" }
+ # s.license = { :type => "MIT", :file => "./LICENSE" }
s.author = { "author" => "[email protected]" }
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/BradyShober/react-native-braintree-dropin-ui.git", :tag => "master" }
- s.source_files = "*.{h,m}"
+ s.source_files = "ios/**/*.{h,m}"
s.requires_arc = true
s.dependency 'React'
s.dependency 'Braintree'
diff --git a/node_modules/react-native-braintree-dropin-ui/react-native.config.js b/node_modules/react-native-braintree-dropin-ui/react-native.config.js
index f162c2b..6550b2f 100644
--- a/node_modules/react-native-braintree-dropin-ui/react-native.config.js
+++ b/node_modules/react-native-braintree-dropin-ui/react-native.config.js
@@ -3,7 +3,7 @@ const path = require('path');
module.exports = {
dependency: {
platforms: {
- ios: { podspecPath: path.join(__dirname, 'ios', 'RNBraintreeDropIn.podspec') },
+ ios: {},
android: {
packageImportPath: 'import tech.power.RNBraintreeDropIn.RNBraintreeDropInPackage;',
packageInstance: 'new RNBraintreeDropInPackage()', Hope this helps! |
Thanks for that. The changes above also resolved the issue I had in the thread https://github.com/wgltony/react-native-braintree-dropin-ui/issues/90 |
Getting error:
TypeError: null is not an object (evaluating '_reactNativeBraintreeDropinUi.default.show')
Following function is being used to display BraintreeDropIn:
const onPressMakePayment = () => {
}
react-native-cli: 2.0.1
react-native: 0.69.4
I have noticed "BraintreeDropIn" is null which is causing issue.
The text was updated successfully, but these errors were encountered: