freeman-industries / react-native-payments-example-ios

Clone this to try using react-native-payments on iOS.
12 stars 4 forks source link

Pod install error #2

Open eqlion opened 3 years ago

eqlion commented 3 years ago

I wanted to try this example, as I cannot make the library work in my project (see https://github.com/naoufal/react-native-payments/issues/276). Following the steps, I get the error while trying to install Pods:

Auto-linking React Native module for target `stripeiOS`: react-native-payments
Analyzing dependencies
[!] The `react-native-payments` pod failed to validate due to 1 error:
    - ERROR | attributes: Missing required attribute `summary`.
GFean commented 3 years ago

Having the same issue... any solutions ?

eqlion commented 3 years ago

@RocKer004 unfortunately, no luck yet. However, in the original issue, there seems to be a solution, which involves commenting out braintree and stripe parts — https://github.com/naoufal/react-native-payments/issues/276#issuecomment-805634483

Moistbobo commented 3 years ago

fix: Bump react-native-payments in package.json to 0.8.2

See below for explanation.

In react-native-payments.podspec you'll see that the summary is mapped to the description field in package.json

pkg = JSON.parse(File.read("package.json")) <-- source

Pod::Spec.new do |s|
  s.name             = pkg["name"]
  s.version          = pkg["version"]
  s.summary       = pkg["description"] <--- here

However there is no description field in package.json, resulting in this issue.

Just add a description field to the package.json in node_modules/react-native-payments and use a package like patch package to persist the changes