githuboftigran / rn-range-slider

A native slider with range
MIT License
237 stars 133 forks source link

Added CocoaPods support #7

Closed nicomontanari closed 5 years ago

nicomontanari commented 5 years ago

I did this pr to allow installing rn-range-slider via cocoapods

dayaki commented 5 years ago

I keep getting No podspec found forRNRangeSliderin../node_modules/rn-range-slider`` and am using v1.2.3, and I can confirm there is a rn-range-slider.podspec file. Any reason for this error?

githuboftigran commented 5 years ago

@dayaki I will probably remove this file. Don't understand why it's needed if react-native link rn-range-slider works prefectly

dayaki commented 5 years ago

The file is needed if using CocoaPods. I was able to make it work before but this update over-write my working version. I will see if I can make it work again and do a PR

githuboftigran commented 5 years ago

@dayaki just removed the podspec and published 1.2.4, please have a look. Did it work?

dayaki commented 5 years ago

@githuboftigran my project is using CocoaPods, so react-native link not working for me.

@nicomontanari98 to make the error go away, I have to rename the popspec file to RNRangeSlider.podspec and change the name to s.name = "RNRangeSlider"

nicomontanari commented 5 years ago

@dayaki what did you write in your pod file?

dayaki commented 5 years ago

This is my pod file content: require 'json'

package = JSON.parse(File.read(File.join(dir, 'package.json')))

Pod::Spec.new do |s| s.name = "RNRangeSlider" s.version = package['version'] s.summary = package['description'] s.license = package['license']

s.authors = package['author'] s.homepage = package['homepage'] s.platform = :ios, "9.0"

s.source = { :git => "https://github.com/githuboftigran/rn-range-slider.git", :tag => "v#{s.version}" } s.source_files = "ios/*/.{h,m}"

s.dependency 'React' end

nicomontanari commented 5 years ago

@dayaki Thank you.

With your configurations in your app podfile you have to write pod 'RNRangeSlider', :path => '../node_modules/RNRangeSlider.podspec'. Instead with my configrations in your app podfile you had to write pod 'rn-range-slider', :path => '../node_modules/rn-range-slider.podspec'.

dayaki commented 5 years ago

@nicomontanari98 so sorry, am so new to react-native, ios development. The name RNRangeSlider in my podfile is the reason it wasn't working before. So sorry.

@githuboftigran I think you can put back the podspec, because its needed for those using CocoaPods

nicomontanari commented 5 years ago

@dayaki don't worry 😉