Tipsi-stripe: Publish a podspec.

Created on 13 Oct 2017  Â·  25Comments  Â·  Source: tipsi/tipsi-stripe

Instead of having us declare a separate target in our project for TPSStripe, please publish a podspec that we can consume directly without need for also specifying the stripe dependency.

All 25 comments

@agrosner we know we were wrong at 3.8.0. We are discussing how to do it better. Any ideas besides podspec?

whats wrong with a podspec? most RN libs publish one and they work great.

@agrosner npm is a common place for both platforms (iOS, Android)

@agrosner thanks for your advice! What RN libs do you mean?

Yes but I was talking about including a podspec file in the repo. Not
publishing to cocoapods.

On Oct 13, 2017 1:32 PM, "Anton Kuznetsov" notifications@github.com wrote:

@agrosner https://github.com/agrosner npm is a common place for both
platforms (iOS, Android)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tipsi/tipsi-stripe/issues/137#issuecomment-336517834,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACBQ43NT-j5x-o_vd9qkZbAVzXM6q7rXks5sr57FgaJpZM4P4w_8
.

Even I am confused after stripe install via cocopod where should we copy the TPSStripe folder.

@anishtr4 You don't need to copy anything. What are you talking about?

@isnifer Iam using all my module via cococpods including stripe. I am little bit confused how to install this via cocopods. is there ".podspec" available , if no can you guide me to create one for this.

@isnifer this is pod file i have created
Pod::Spec.new do |s|
s.name = 'tipsi-stripe'
s.author = 'Tipsi'
s.source_files = 'ios/TPSStripe/'
s.platform = :ios, '8.0'
s.license = 'MIT'
s.homepage = 'https://github.com/tipsi/tipsi-stripe#readme'
s.source = {:path => './ios/
'}
s.summary = 'tipsi-stripe'
s.version = '3.8.1'
s.dependency 'React'
end

but after installing the pods I am getting error saying #import file not found

yes. @anishtr4 that is why I filed this ticket. They should just create a podspec in the repo that we reference and then we never have to import stripe pod directly, only this library.

@agrosner

I have fixed the issue . Create a .podspec file with following lines inside your node_modules/tipsi-stripe

Pod::Spec.new do |s|
s.name = 'tipsi-stripe'
s.author = 'Tipsi'
s.source_files = 'ios/TPSStripe/'
s.platform = :ios, '8.0'
s.license = 'MIT'
s.homepage = 'https://github.com/tipsi/tipsi-stripe#readme'
s.source = {:path => './ios/
'}
s.summary = 'tipsi-stripe'
s.version = '3.8.1'
s.dependency 'Stripe'
s.dependency 'React'
end

@agrosner let me know if the above podspec works for you. :)

@agrosner @anishtr4 I will talk with @dmytrozavgorodniy and he will add it tomorrow. Thank you. guys!

@agrosner @anishtr4 If we will use .podspec in dependency we should refer to React cocoapods dependency, but it is deprecated. React podspec refer to v0.13.0-rc of react native (React.podspec.json)

@agrosner @anishtr4 your turn)

you dont reference the podspec for react on cocoapods....you reference the spec locally on your machine.

this is my pod file in my project:

target 'my project' do

    pod 'RNFirebase', :path => '../node_modules/react-native-firebase'

    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    pod 'Firebase/Crash'

    pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
    pod 'React', :path => '../node_modules/react-native', :subspecs => [
  'BatchedBridge', # Required For React Native 0.45.0+
  'Core',
    'DevSupport',
    'RCTText',
    'RCTGeolocation',
    'RCTVibration',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTSettings',
    'RCTActionSheet',
    'RCTAnimation',
  # Add any other subspecs you want to use in your project
]

    pod 'Stripe', '~> 10.1.0'
    pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
    pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
    pod 'react-native-calendar-events', :path => '../node_modules/react-native-calendar-events'
    pod 'RNSVG', :path => '../node_modules/react-native-svg'
    pod 'react-native-blur', :path => '../node_modules/react-native-blur'
    pod 'lottie-ios', :path => '../node_modules/lottie-ios'
    pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
end

having a .podspec is an easy win and one that gets rid of lot of confusion as it adds stripe to the podfile after link and one only has to run pod install from there.

thanks anish for the podspec.

with the latest release this taken care of by the link script. (looks like it uses ruby script to do the necessary linking etc)

react-native link does not work for me due to using Kotlin in the Android project. I manually add the libs as Pods in iOS also because it doesn't or didn't respect cocoapods, leading to broken iOS builds anyways. Adding a .podspec to the repo that you reference is a one-liner. Modifying the node_modules project in my app locally does not work on continuous integration environments.

@agrosner latest release doesn't update project in node_modules

@agrosner update to 3.9.0

right but the whole point of the ticket is to provide a podspec, which seems to be missing in 3.9.0 and react-native link does not work for me (and potentially others who implement pods + Kotlin Android the way I do)

@agrosner @shaksi @anishtr4 published as 4.1.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psimk picture psimk  Â·  47Comments

Infokora picture Infokora  Â·  25Comments

alibarisoztekin picture alibarisoztekin  Â·  33Comments

apolishch picture apolishch  Â·  56Comments

mikedizon picture mikedizon  Â·  17Comments