react-native-gallery-manager icon indicating copy to clipboard operation
react-native-gallery-manager copied to clipboard

request: Create a CocoaPod

Open vs-lance opened this issue 6 years ago • 5 comments

I have a rather unusual react-native project, and it would be great if there was a pod for this.

vs-lance avatar Jul 11 '18 22:07 vs-lance

what do you mean?

pentarex avatar Jul 12 '18 19:07 pentarex

Similar to how other libraries do it ( for example react-native-video: https://github.com/react-native-community/react-native-video/blob/master/react-native-video.podspec)

I need to include my react native app as part of a larger ios app so I'm following these directions: https://facebook.github.io/react-native/docs/integration-with-existing-apps.html

And you'll notice way down the page there is a podfile that is used to import and link external dependencies. I'd like to add the Gallery Manager to my podfile. Something like:

pod 'RNGalleryManager', :podspec => './node_modules/react-native-gallery-manager/react-native-gallery-manager.podspec'

vs-lance avatar Jul 12 '18 21:07 vs-lance

This worked for me though I think you'll have to change the path to node_modules if you include it in your npm packaged version

`require 'json'

pjson = JSON.parse(File.read("./node_modules/react-native-gallery-manager/package.json"))

Pod::Spec.new do |s|

s.name = "RNGalleryManager" s.version = pjson["version"] s.homepage = "https://github.com/VideoSlick/react-native-gallery-manager" s.summary = pjson["description"] s.license = "MIT" s.author = { "Hristo Hristov" => "[email protected]" }

s.ios.deployment_target = '7.0'

s.source = { :git => "https://github.com/VideoSlick/react-native-gallery-manager.git", :tag => "v#{s.version}" } s.source_files = 'ios/*.{h,m}' s.dependency "React" end `

vs-lance avatar Jul 13 '18 18:07 vs-lance

Note that I've forked your repo and created a tag. That's not actually necessary - if you leave that off it just checks out the master branch.

vs-lance avatar Jul 13 '18 20:07 vs-lance

Hello Team @vs-lance @pentarex this solution its worked for me, but please update version in NPM We need a file react-native-gallery-manager.podspec

Close this issue ;)

aelarassi avatar Mar 11 '20 16:03 aelarassi