Skip to content
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

null is not an object (evaluating 'ReactNativePayments.createPaymentRequest') #186

Closed
alexeyz-PE opened this issue Sep 19, 2019 · 3 comments

Comments

@alexeyz-PE
Copy link

No description provided.

@SainiJii
Copy link

SainiJii commented Sep 22, 2019

Hello @alexeyz-PE ,
I was facing the same issue. I did one thing to solve this issue, I know that's not the correct and good programming practice but solved my issue:
I just copied and paste following files from "node_modules/react-native-payments/lib/ios/" to my project folder in xcode:

GatewayManager.h
GatewayManager.m
ReactNativePayments.h
ReactNativePayments.m

and Complete "Views" Folder

See screenshots below:

Screen Shot 2019-09-22 at 23 27 24
Screenshot 2019-09-22 at 11 00 35 AM

Edit:
I think, I got the proper solution. Actually there is a problem with "ReactNativePayments.podspec" file, follow the below steps:

  1. Run npm install react-native-payments --save command
  2. Open "ReactNativePayments.podspec" file and some changes (Refer screenshot below)

Screenshot 2019-09-23 at 12 52 21 PM

  1. Then run link command react-native link react-native-payments
  2. Go to ios folder and run following command
    "pod cache clean --all" and "pod install"

Please let me know if those solution help you.

Thanks
Alankar Saini

@ramisalem
Copy link

@SainiJii what is the path of ReactNativePayments.podspec file?

@harbolaez
Copy link

@SainiJii I try that, but still the same issue. I see a few people have succeed, do you think is applicable in version 0.8.2?
This is my changes

require 'json'
pkg = JSON.parse(File.read("package.json"))
version = pkg["version"]
giturl = pkg["repository"]["url"]

Pod::Spec.new do |s|
  s.name             = pkg["name"]
  s.version          = pkg["version"]
  s.summary          = pkg["description"]
  s.requires_arc     = true
  s.license          = pkg["license"]
  s.homepage         = pkg["homepage"]
  s.author           = pkg["author"]
  s.source           = { :git => pkg["repository"]["url"] }
  s.source_files     = 'lib/ios/*.{h,m}'
  s.platform         = :ios, "8.0"
  s.requires_arc     = true

  s.dependency 'React'
  s.dependency 'Stripe'
  s.dependency 'Braintree'
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants